[Bug c++/114632] ICE with explicit this in lambda

2024-04-15 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114632 waffl3x changed: What|Removed |Added CC||waffl3x at protonmail dot com --- Comment #2

[Bug c++/113388] Calling explicit object member function without object argument inside a function that is not an implicit object member function

2024-01-14 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113388 --- Comment #1 from waffl3x --- Yeah, looks like a bug. I won't be able to look at it as I am in the process of moving but it seems like a similar one to PR113348. Thanks for the report!

[Bug c++/113348] New: ice when calling xobj member function without an object in an xobj member function

2024-01-12 Thread waffl3x at protonmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: waffl3x at protonmail dot com Target Milestone: --- struct S { void f(this S& self) {} void g(this S self) { f(); } }; void test() { S{}.g(); } Som

[PATCH] c++: reject packs on xobj params. [PR113307]

2024-01-11 Thread waffl3x
Bootstrapped and tested on x86_64-linux with no regressions. I'm still getting used to things so let me know if the change log entries are excessive, thanks.From 9dc168e7bcbbd7d515fa28cb9cae28ec113fae0f Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Thu, 11 Jan 2024 14:32:46 -0700 Subject: [PATCH

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2024-01-11 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #29 from waffl3x --- https://cplusplus.github.io/CWG/issues/2789.html My alteration to CWG2789 came up on reddit and I realized I should probably post about it here. Instead of: "if both are non-static member functions, they

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2024-01-11 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #26 from waffl3x --- (In reply to corentinjabot from comment #25) > Hey folks. > Congrats on landing support for deducing this in GCC. Thanks! > While there is no spec for it, after discussion here, > https://github

Re: lambda coding style

2024-01-10 Thread waffl3x via Gcc
On Wednesday, January 10th, 2024 at 7:34 PM, Jason Merrill via Gcc wrote: > > > On 1/10/24 16:41, Marek Polacek wrote: > > > On Wed, Jan 10, 2024 at 04:24:42PM -0500, Jason Merrill wrote: > > > > > On 1/10/24 15:59, Marek Polacek wrote: > > > > > > > On Wed, Jan 10, 2024 at

[Bug c++/113307] fails to diagnose an explicit object parameter to be a function parameter pack

2024-01-10 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113307 --- Comment #1 from waffl3x --- I'm on it.

[Bug c++/113308] derived class doesn't currently allow inherited explicit object member function post increment operator

2024-01-10 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113308 --- Comment #3 from waffl3x --- I meant to post this link instead of one of the others. https://godbolt.org/z/oMP8185Yh I guess I shouldn't be replying to things while still waking up, sorry!

[Bug c++/113308] derived class doesn't currently allow inherited explicit object member function post increment operator

2024-01-10 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113308 --- Comment #2 from waffl3x --- (In reply to Nathaniel Shead from comment #1) > I believe this is correct behaviour: The definition of `operator++` in the > child class hides the `operator++` declared in the base class. Sim

Re: [PATCH v8 1/4] c++: P0847R7 (deducing this) - prerequisite changes. [PR102609]

2024-01-09 Thread waffl3x
On Tuesday, January 9th, 2024 at 3:52 PM, Jason Merrill wrote: > > > On 1/9/24 17:34, waffl3x wrote: > > > On Tuesday, January 9th, 2024 at 2:56 PM, Jason Merrill ja...@redhat.com > > wrote: > > > > > > Is the type of an implicit ob

Re: [PATCH v8 1/4] c++: P0847R7 (deducing this) - prerequisite changes. [PR102609]

2024-01-09 Thread waffl3x
On Tuesday, January 9th, 2024 at 2:56 PM, Jason Merrill wrote: > > > On 1/9/24 15:58, Jason Merrill wrote: > > > On 1/6/24 19:00, waffl3x wrote: > > > > > Bootstrapped and tested on x86_64-linux with no regressions. > > > > > > I'

Re: [PATCH v8 1/4] c++: P0847R7 (deducing this) - prerequisite changes. [PR102609]

2024-01-09 Thread waffl3x
On Tuesday, January 9th, 2024 at 1:58 PM, Jason Merrill wrote: > > > On 1/6/24 19:00, waffl3x wrote: > > > Bootstrapped and tested on x86_64-linux with no regressions. > > > > I'm considering this finished, I have CWG2586 working but I have not > > incl

Re: Stage 4 date

2024-01-07 Thread waffl3x via Gcc
On Sunday, January 7th, 2024 at 3:22 PM, Jakub Jelinek wrote: > > > On Sun, Jan 07, 2024 at 03:12:32PM -0700, Jeff Law via Gcc wrote: > > > On 1/7/24 08:48, waffl3x via Gcc wrote: > > > > > https://gcc.gnu.org/develop.html#timeline > > >

[PATCH v8 5/4] c++: P0847R7 (deducing this) - CWG2586. [PR102609]

2024-01-07 Thread waffl3x
Bootstrapped and tested on x86_64-linux with no regressions. Not as hard as I thought it would be! As noted in the commit message, I believe this makes explicit object member functions feature complete.From a5f947d411b5e19ce7efbb4d766a2792b02c9626 Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Sun

Stage 4 date

2024-01-07 Thread waffl3x via Gcc
https://gcc.gnu.org/develop.html#timeline The date for stage 4 is listed as the 8th on here, is that date final? There is at least 1 patch pending (mine) that is complete but Jason Merril hasn't been active for a few days. He had expressed to me that he expected the date to be next week on the

Re: [PATCH v8 4/4] c++: P0847R7 (deducing this) - xobj lambdas. [PR102609]

2024-01-06 Thread waffl3x
On Saturday, January 6th, 2024 at 5:17 PM, Jakub Jelinek wrote: > > > On Sun, Jan 07, 2024 at 12:05:50AM +, waffl3x wrote: > > > Bootstrapped and tested on x86_64-linux with no regressions. > > > > That's it for now. If I manage to finish CWG2586 i

[PATCH v8 4/4] c++: P0847R7 (deducing this) - xobj lambdas. [PR102609]

2024-01-06 Thread waffl3x
Bootstrapped and tested on x86_64-linux with no regressions. That's it for now. If I manage to finish CWG2586 in time I guess I'll submit it as patch 5/4? I'm definitely locked in on all these changes unless there's a really good reason. Alex

[PATCH v8 3/4] c++: P0847R7 (deducing this) - diagnostics. [PR102609]

2024-01-06 Thread waffl3x
Bootstrapped and tested on x86_64-linux with no regressions.From 32a713d9826a042b260e84dcfbfd31c619a122fb Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Fri, 5 Jan 2024 14:34:34 -0700 Subject: [PATCH 3/4] C++23 P0847R7 (deducing this) - diagnostics. [PR102609] Diagnostics for xobj member functions

[PATCH v8 1/4] c++: P0847R7 (deducing this) - prerequisite changes. [PR102609]

2024-01-06 Thread waffl3x
, fingers crossed. AlexFrom cd122053dfad741a7d90adcd45929af768ce643f Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Sun, 31 Dec 2023 03:16:36 -0700 Subject: [PATCH 1/4] C++23 P0847R7 (deducing this) - prerequisite changes. [PR102609] Adds the xobj_flag member to lang_decl_fn and a corresponding

Re: [PATCH v7 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2024-01-06 Thread waffl3x
ll have to look over it quickly but hopefully it will be split up enough to make that convenient. Alex On Monday, January 1st, 2024 at 10:12 AM, waffl3x wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113191 > > I've posted the report here, I ended up doing a bit mo

[Bug c++/113191] [11/12/13/14 Regression] Incorrect overload resolution when base class function introduced with a using declaration is more constrained than a function declared in the derived class

2024-01-02 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113191 --- Comment #2 from waffl3x --- > Looking at the above commit, joust already takes care to check > more_constrained for non-template functions, and only if their function > parameters match according to cand_parms_match.

Re: [PATCH v7 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2024-01-01 Thread waffl3x
functions introduced by using declarations are handled properly. I think that's the best option for my patch right now. Well that investigation took the majority of my day. I'm just glad I'm certain of what direction to take now. Alex On Monday, January 1st, 2024 at 8:34 AM, waffl3x wrote

[Bug c++/113191] New: [10.1/11/12/13/14 Regression] Incorrect overload resolution when base class function introduced with a using declaration is more constrained than a function declared in the deriv

2024-01-01 Thread waffl3x at protonmail dot com via Gcc-bugs
declared in the derived class Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: waffl3x at protonmail

Re: [PATCH v7 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2024-01-01 Thread waffl3x
really unproductive when the majority is investigation and thinking. This was one of them, but at least I'm confident that my conclusions are correct. Aren't edge cases fun? Alex On Monday, January 1st, 2024 at 8:17 AM, waffl3x wrote: > > > I've been at this for a while, and I'm not

Re: [PATCH v7 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2024-01-01 Thread waffl3x
wrote: > > > On 12/23/23 02:10, waffl3x wrote: > > > On Friday, December 22nd, 2023 at 10:26 AM, Jason Merrill ja...@redhat.com > > wrote: > > > > > On 12/22/23 04:01, waffl3x wrote: > > > > > > > int n = 0; > > >

Re: [PATCH v7 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-12-22 Thread waffl3x
On Friday, December 22nd, 2023 at 10:26 AM, Jason Merrill wrote: > > > On 12/22/23 04:01, waffl3x wrote: > > > int n = 0; > > auto f = [](this Self){ > > static_assert(__is_same (decltype(n), int)); > > decltype((n)) a; // { dg-error {is not captured}

Re: [PATCH v7 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-12-22 Thread waffl3x
int n = 0; auto f = [](this Self){ static_assert(__is_same (decltype(n), int)); decltype((n)) a; // { dg-error {is not captured} } }; f(); Could you clarify if this error being removed was intentional. I do recall that Patrick Palka wanted to remove this error in his patch, but

[Bug c++/113075] New: Inconsistent/wrong diagnostic when incorrectly taking address of single/overloaded

2023-12-18 Thread waffl3x at protonmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: waffl3x at protonmail dot com Target Milestone: --- I am including all 3 bugs in a single report as they are similar and located in the same region of code

[Bug c++/83417] Pointer-to-member template parameter with auto member type dependent container type does not work (C++17)

2023-12-15 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83417 waffl3x changed: What|Removed |Added CC||waffl3x at protonmail dot com --- Comment #5

Re: [PATCH v7 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-12-10 Thread waffl3x
On Friday, December 8th, 2023 at 12:25 PM, Jason Merrill wrote: > > > On 12/6/23 02:33, waffl3x wrote: > > > Here is the next version, it feels very close to finished. As before, I > > haven't ran a bootstrap or the full testsuite yet but I did run the > > expl

Re: [PATCH v7 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-12-06 Thread waffl3x
Follow up to this, bootstrapped and tested with no regressions. On Wednesday, December 6th, 2023 at 12:33 AM, waffl3x wrote: > > > Here is the next version, it feels very close to finished. As before, I > haven't ran a bootstrap or the full testsuite yet but I did run the &g

Re: [PATCH v7 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-12-06 Thread waffl3x
On Wednesday, December 6th, 2023 at 1:48 AM, Jakub Jelinek wrote: > > > On Wed, Dec 06, 2023 at 07:33:21AM +, waffl3x wrote: > > > Here is the next version, it feels very close to finished. As before, I > > haven't ran a bootstrap or the full tes

Re: [PATCH RFA (libstdc++)] c++: partial ordering of object parameter [PR53499]

2023-12-05 Thread waffl3x
On Tuesday, December 5th, 2023 at 9:36 PM, Jason Merrill wrote: > > > On 12/5/23 23:23, waffl3x wrote: > > > Does CWG2834 effect this weird edge case? > > > 2834 affects all partial ordering with explicit object member functions; Both in relation to each ot

[Bug c++/112874] New: low quality diagnostic for overload resolution failure when taking address of overloaded function

2023-12-05 Thread waffl3x at protonmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: waffl3x at protonmail dot com Target Milestone: --- template inline constexpr bool not_int_v = !__is_same (T, int); template concept NotInt = not_int_v

Re: [PATCH RFA (libstdc++)] c++: partial ordering of object parameter [PR53499]

2023-12-05 Thread waffl3x
Does CWG2834 effect this weird edge case? I couldn't quite grasp the standardese so I'm not really sure. These are a few cases from a test that I finalized last night. I ran this by jwakely and he agreed that the behavior as shown is correct by the standard. I'll also add that this is also the

Re: contributor guidelines

2023-12-04 Thread waffl3x via Gcc
as both new and having disappeared. This is because some of the tests either incorrectly include the full patch, or include the line number. Here's examples of each of these from my latest comparison. ``` New tests that FAIL (4 tests): g++.dg/modules/xtreme-header-4_b.C -std=c++2b (internal compiler error:

Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-12-04 Thread waffl3x
>> @@ -15402,6 +15450,8 @@ tsubst_decl (tree t, tree args, tsubst_flags_t >> complain, >> gcc_checking_assert (TYPE_MAIN_VARIANT (TREE_TYPE (ve)) >>== TYPE_MAIN_VARIANT (type)); >> SET_DECL_VALUE_EXPR (r, ve); >> +

Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-12-04 Thread waffl3x
On Monday, December 4th, 2023 at 9:35 PM, waffl3x wrote: > > > >> @@ -15402,6 +15450,8 @@ tsubst_decl (tree t, tree args, tsubst_flags_t > >> complain, > > > > gcc_checking_assert (TYPE_MAIN_VARIANT (TREE_TYPE (ve)) > > > == TYPE_MAIN_VARI

Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-12-04 Thread waffl3x
On Monday, December 4th, 2023 at 9:39 PM, waffl3x wrote: > On Monday, December 4th, 2023 at 9:35 PM, waffl3x waff...@protonmail.com > wrote: > > > > > > > @@ -15402,6 +15450,8 @@ tsubst_decl (tree t, tree args, tsubst_flags_t > > > > co

Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-12-01 Thread waffl3x
On Friday, December 1st, 2023 at 9:52 AM, Jason Merrill wrote: > > > On 12/1/23 01:02, waffl3x wrote: > > > I ran into another issue while devising tests for redeclarations of > > xobj member functions as static member functions and vice versa. I am > &

[Bug c++/112810] New: bogus ambiguous overload resolution when taking address of static/xobj member function template introduced by using declaration where candidates have a mismatched deduced return

2023-12-01 Thread waffl3x at protonmail dot com via Gcc-bugs
a mismatched deduced return type Product: gcc Version: 4.9.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: waffl3x at protonmail dot com

Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-30 Thread waffl3x
I ran into another issue while devising tests for redeclarations of xobj member functions as static member functions and vice versa. I am pretty sure by the literal wording of the standard, this is well formed. template concept Constrain = true; struct S { void f(this auto, Constrain auto) {};

Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-29 Thread waffl3x
On Wednesday, November 29th, 2023 at 10:00 PM, Jason Merrill wrote: > > > On 11/27/23 00:35, waffl3x wrote: > > > I think this is cleaned up enough to be presentable. Bootstrapped but > > not tested but I don't think I changed anything substantial. I am >

Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-28 Thread waffl3x
This fixes the const bug. I haven't bootstrapped and tested beyond my own tests yet but this does it. I don't know if this is the right way to fix this yet, but I think it's pretty close. I'll see if I can make a better write up tomorrow, but it seems to me that since we never cared about

Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-27 Thread waffl3x
On Sunday, November 26th, 2023 at 7:40 PM, Jason Merrill wrote: > > > On 11/26/23 20:44, waffl3x wrote: > > > > > > > The other problem I'm having is > > > > > > > > > > > > auto f0 = [n = 5, ](this auto const&){ n = 1

Re: [PATCH v5 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-26 Thread waffl3x
> > > > OKAY, I figured out SOMETHING, I think this should be fine. As noted in > > > > the comments, this might be a better way of handling the static lambda > > > > case too. This is still a nasty hack so it should probably be done > > > > differently, but I question if making a whole new fntype

Re: [PATCH v5 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-26 Thread waffl3x
> > Now with that out of the way, I do still kind of feel icky about it. > > This really is a MASSIVE edge case that will almost never matter. As > > far as I know, instantiating explicitly like so... > > > > auto f = [x = 42](this auto&&) -> int { return x; }; > > int (*fp)(int&) =

Re: [PATCH v5 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-26 Thread waffl3x
On Sunday, November 26th, 2023 at 2:30 PM, Jason Merrill wrote: > > > On 11/24/23 20:14, waffl3x wrote: > > > OKAY, I figured out SOMETHING, I think this should be fine. As noted in > > the comments, this might be a better way of handling the static lambda >

Re: [PATCH v5 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-25 Thread waffl3x
ovember 25th, 2023 at 10:32 AM, Jason Merrill wrote: > > > On 11/24/23 01:49, waffl3x wrote: > > > > and this in tsubst_lambda_expr that assumes iobj: > > > > > > /* Fix the type of 'this'. */ > > > fntype = build_memfn_type (fntype, type, >

Re: [PATCH v5 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-24 Thread waffl3x
OKAY, I figured out SOMETHING, I think this should be fine. As noted in the comments, this might be a better way of handling the static lambda case too. This is still a nasty hack so it should probably be done differently, but I question if making a whole new fntype node in tsubst_lambda_expr

Re: [PATCH v5 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-24 Thread waffl3x
the right place to do that is though, or really why it's not happening already, so I'm just gonna poke around, try some things, and clean it up later if it's messy. That's my quick update, hopefully this gets me somewhere finally. Alex On Thursday, November 23rd, 2023 at 11:49 PM, waffl3x

Re: [PATCH v5 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-23 Thread waffl3x
> and this in tsubst_lambda_expr that assumes iobj: > > /* Fix the type of 'this'. */ > fntype = build_memfn_type (fntype, type, > type_memfn_quals (fntype), > type_memfn_rqual (fntype)); Unfortunately, putting a condition on this had some unforeseen consequences. I've been working on this about

Re: [PATCH v5 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-22 Thread waffl3x
On Wednesday, November 22nd, 2023 at 2:38 PM, Jason Merrill wrote: > > > On 11/22/23 15:46, waffl3x wrote: > > > On Tuesday, November 21st, 2023 at 8:22 PM, Jason Merrill ja...@redhat.com > > wrote: > > > > > On 11/21/23 08:04, w

Re: [PATCH v5 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-22 Thread waffl3x
On Tuesday, November 21st, 2023 at 8:22 PM, Jason Merrill wrote: > > > On 11/21/23 08:04, waffl3x wrote: > > > Bootstrapped and tested on x86_64-linux with no regressions. > > > > Hopefully this patch is legible enough for reviewing purposes, I've not &g

Re: [PATCH v5 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-22 Thread waffl3x
> > > > /* Nonzero for FUNCTION_DECL means that this decl is a non-static > > > > - member function. */ > > > > + member function, use DECL_IOBJ_MEMBER_FUNC_P instead. */ > > > > #define DECL_NONSTATIC_MEMBER_FUNCTION_P(NODE) \ > > > > (TREE_CODE (TREE_TYPE (NODE)) == METHOD_TYPE) > > > > > > > >

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-21 Thread waffl3x
On Monday, November 20th, 2023 at 7:35 AM, Jason Merrill wrote: > > > On 11/19/23 16:44, waffl3x wrote: > > > On Sunday, November 19th, 2023 at 1:34 PM, Jason Merrill ja...@redhat.com > > wrote: > > > > > On 11/19/23 13:36, waffl3x wrote: &

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-19 Thread waffl3x
On Sunday, November 19th, 2023 at 1:34 PM, Jason Merrill wrote: > > > On 11/19/23 13:36, waffl3x wrote: > > > I'm having trouble fixing the error for this case, the control flow > > when the functions are overloaded is much more complex. > > &g

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-19 Thread waffl3x
On Sunday, November 19th, 2023 at 9:31 AM, Jason Merrill wrote: > > > On 11/19/23 08:39, waffl3x wrote: > > > Funny enough I ended up removing the ones I was thinking about, seems > > to always happen when I ask style questions but I'm glad to hear it's > > o

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-19 Thread waffl3x
record_type or union_type or qual_union_type, have integer_type in finish_non_static_data_member, at cp/semantics.cc:2294 31 | auto f1 = [x](this auto&& self) {}; | ^ 0x1c66dda tree_check_failed(tree_node const*, char const*, int, char const*, ...) /h

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-17 Thread waffl3x
The patch is coming along, I just have a quick question regarding style. I make use of IILE's (immediately invoked lambda expression) a whole lot in my own code. I know that their use is controversial in general so I would prefer to ask instead of just submitting the patch using them a bunch

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-13 Thread waffl3x
On Monday, November 13th, 2023 at 8:48 PM, Jason Merrill wrote: > > > On 11/11/23 05:43, waffl3x wrote: > > > > [combined reply to all three threads] > > > > > > On 11/9/23 23:24, waffl3x wrote: > > > > > > > > &

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-11 Thread waffl3x
Just a quick addition here as I was starting to work on things I realized where some misunderstandings were coming from. (Please also see my previous e-mail, it is all still relevant, I just wanted to clarify this.) (From the other thread) > > @@ -9949,7 +9951,8 @@ build_over_call (struct

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-11 Thread waffl3x
> [combined reply to all three threads] > > On 11/9/23 23:24, waffl3x wrote: > > > > > I'm unfortunately going down a rabbit hole again. > > > > > > > > --function.h:608 > > > > `/* If pointers to member functions use the least signif

Re: [PATCH v4 2/2] c++: Diagnostics for P0847R7 (Deducing this) [PR102609]

2023-11-10 Thread waffl3x
> > I had wanted to write about some of my frustrations with trying to > > write a test for virtual specifiers and errors/warnings for > > shadowing/overloading virtual functions, but I am a bit too tired at > > the moment and I don't want to delay getting this up for another night. > > In short,

Re: [PATCH v4 1/2] c++: Initial support for P0847R7 (Deducing this) [PR102609]

2023-11-09 Thread waffl3x
should just revise this patch with everything else. On Thursday, November 9th, 2023 at 2:53 PM, Jason Merrill wrote: > > > On 11/5/23 10:06, waffl3x wrote: > > > Bootstrapped and tested on x86_64-linux with no regressions. > > > > I originally threw t

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-09 Thread waffl3x
> > I'm unfortunately going down a rabbit hole again. > > > > --function.h:608 > > `/* If pointers to member functions use the least significant bit to > > indicate whether a function is virtual, ensure a pointer to this function > > will have that bit clear. */ #define MINIMUM_METHOD_BOUNDARY

Re: [PATCH v4 1/2] c++: Initial support for P0847R7 (Deducing this) [PR102609]

2023-11-07 Thread waffl3x
I guess I'll be attaching all new e-mails here. I found a new, kinda scary issue. ``` bool start_preparsed_function (tree decl1, tree attrs, int flags) { tree ctype = NULL_TREE; bool doing_friend = false; /* Sanity check. */ gcc_assert (VOID_TYPE_P (TREE_VALUE (void_list_node)));

Re: [PATCH v4 1/2] c++: Initial support for P0847R7 (Deducing this) [PR102609]

2023-11-06 Thread waffl3x
I noticed I made a bit of a mistake in grokdeclarator:find_xobj_parm, this code: ``` if (!parm_list || parm_list == void_list_node) return false; if (TREE_PURPOSE (parm_list) != this_identifier) return false; ``` Can be simplified to this code: ``` if (!parm_list || TREE_PURPOSE (parm_list)

[PATCH v4 2/2] c++: Diagnostics for P0847R7 (Deducing this) [PR102609]

2023-11-05 Thread waffl3x
to be getting close to a final product here. Hopefully if all goes well I'll be able to fit in the final missing features before feature lock hits. AlexFrom c8e8155a635fab7f326d0ad32326da352d7c323e Mon Sep 17 00:00:00 2001 From: waffl3x Date: Sun, 5 Nov 2023 05:17:18 -0700 Subject: [PATCH 2/2] c

[PATCH v4 1/2] c++: Initial support for P0847R7 (Deducing this) [PR102609]

2023-11-05 Thread waffl3x
Mon Sep 17 00:00:00 2001 From: waffl3x Date: Sat, 4 Nov 2023 05:35:10 -0600 Subject: [PATCH 1/2] c++: Initial support for C++23 P0847R7 (Deducing this) [PR102609] This patch implements initial support for P0847R7 without diagnostics. My goal was to minimize changes to the existing code

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-04 Thread waffl3x
I'm unfortunately going down a rabbit hole again. --function.h:608 ``` /* If pointers to member functions use the least significant bit to indicate whether a function is virtual, ensure a pointer to this function will have that bit clear. */ #define MINIMUM_METHOD_BOUNDARY \

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-02 Thread waffl3x
> > That leaves 2, 4, and 5. > > > > 2. I am pretty sure xobj functions should have the struct they are a > > part of recorded as the method basetype member. I have already checked > > that function_type and method_type are the same node type under the > > hood and it does appear to be, so it

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-02 Thread waffl3x
, November 1st, 2023 at 5:15 PM, waffl3x wrote: > > > Just want to quickly check, when is the cutoff for GCC14 exactly? I > want to know how much time I have left to try to tackle this bug with > subscript. I'm going to be crunching out final stuff this week and I'll > try

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-01 Thread waffl3x
Just want to quickly check, when is the cutoff for GCC14 exactly? I want to know how much time I have left to try to tackle this bug with subscript. I'm going to be crunching out final stuff this week and I'll try to get a (probably non-final) patch for you to review today. Alex

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-28 Thread waffl3x
MEM_OK_P > (arg)); t = TREE_OPERAND (arg, 1); if (TYPE_REF_P (TREE_TYPE (t))) { if > (complain & tf_error) error_at (loc, "cannot create pointer to reference > member %qD", t); return error_mark_node; } /* -- Waffl3x additions start -- > */ /* Exception for non-overlo

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-27 Thread waffl3x
(TREE_TYPE (t))) { if (complain & tf_error) error_at (loc, "cannot create pointer to reference member %qD", t); return error_mark_node; } /* -- Waffl3x additions start -- */ /* Exceptio

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-19 Thread waffl3x
> > > > Based on what you've said, I assume that OFFSET_REF handles static > > member functions that are overloaded. But as I've said this seems to > > contradict the comments I'm reading, so I'm not sure that I'm > > understanding you correctly. > > > That's right. For instance, > > struct A

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-19 Thread waffl3x
> (waffl3x (me)) > At a glance it seems like all I need to do then is disable the > PTRMEM_OK_P flag then. I'm just now realizing that I'm almost certainly wrong about this. It still needs PTRMEM_OK_P set if there are any implicit-object member functions in the ove

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-19 Thread waffl3x
> A BASELINK expresses the result of name lookup for a member function, > since we need to pass information about the name lookup context along to > after overload resolution. > > An OFFSET_REF (with PTRMEM_OK_P) is used to express that we saw the > ::f syntax, so we could build a pointer to

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-19 Thread waffl3x
> No, that wouldn't be appropriate for translation. > None of non-member, static member and explicit object member are > something that should be printed verbatim untranslated. > "%s function %qD cannot have cv-qualifier", _("non-member") > etc. is still inappropriate, some language might need to

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-19 Thread waffl3x
> (Jakub) > There are different kinds of format strings in GCC, the most common > are the gcc-internal-format strings. If you call a function which > is expected to take such translatable format string (in particular > a function which takes a gmsgid named argument like error, error_at, > pedwarn,

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-18 Thread waffl3x
> > I will try to get something done today, but I was struggling with > > writing some of the tests, there's also a lot more of them now. I also > > wrote a bunch of musings in comments that I would like feedback on. > > > > My most concrete question is, how exactly should I be testing a > >

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-18 Thread waffl3x
> Any progress on this, or do I need to coax the process along? :) Yeah, I've been working on it since the copyright assignment process has finished, originally I was going to note that on my next update which I had hoped to finish today or tomorrow. Well, in truth I was hoping to send one the

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-09-27 Thread Waffl3x
p.m., Hans-Peter Nilsson wrote: >> Date: Tue, 26 Sep 2023 01:56:55 + >> From: waffl3x > >> Signed-off-by: waffl3x > > I think I've read that you have to put your actual name in > the DCO; using an alias (presumably) as above would be > wrong. > > A

[PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-09-25 Thread waffl3x
though. Hopefully they get back to me soon. Bootstrapped and regtested on x86_64-pc-linux-gnu. From bbfbcc72e8c0868559284352c71731394c98441e Mon Sep 17 00:00:00 2001 From: waffl3x Date: Mon, 25 Sep 2023 16:59:10 -0600 Subject: [PATCH] c++: Initial support for C++23 P0847R7 (Deducing This) [PR

Re: [PATCH v2 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-09-21 Thread waffl3x
> This seems like a reasonable place for it since 'this' is supposed to > precede the decl-specifiers, and since we are parsing initial attributes > here rather than in the caller. You will want to give an error if > found_decl_spec is set. And elsewhere complain about 'this' on > parameters after

[PATCH v2 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-09-19 Thread waffl3x
> Thank you, this is great! Thanks! > One legal hurdle to start with: our DCO policy > (https://gcc.gnu.org/dco.html) requires real names in the sign-off, not > pseudonyms. If you would prefer to contribute under this pseudonym, I > encourage you to file a copyright assignment with the FSF, who

[PATCH v2 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-09-11 Thread waffl3x via Gcc-patches
00:00:00 2001 From: Waffl3x Date: Mon, 11 Sep 2023 04:21:10 -0600 Subject: [PATCH] c++: Initial support for C++23 P0847R7 (Deducing This) [PR102609] This patch implements initial support for P0847R7, without additions to diagnostics. Almost everything should work correctly, barring a few

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-09-02 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #18 from waffl3x --- (In reply to Gašper Ažman from comment #17) > Read through the patch quickly, want to suggest a few tests. > > When a lambda has captures, the explicit object parameter is used to get at > th

Re: [PATCH 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-09-02 Thread waffl3x via Gcc-patches
Hey Jakub, thanks for the response and criticism, as soon as I am back at a computer I will address the issues you raised, I have a few questions though. I apologize in advanced for any errors in formatting this message, I'm writing it from a hotel room on a phone so errors are inevitable, but

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-08-31 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #16 from waffl3x --- Just gotta note that the patch posted here had an oversight, it never worked as I hoped. The good news is, I submitted a finalized patch to the patch maillist, just before I have to leave. Thanks for the help

[PATCH 2/2] c++: Extended diagnostics for P0847R7 (Deducing This) [PR102609]

2023-08-31 Thread waffl3x via Gcc-patches
d82a34432364b391abde44a23ceacb3c398a519d Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Thu, 31 Aug 2023 02:13:52 -0400 Subject: [PATCH 2/2] P0847R7 (deducing this) Extended diagnostics gcc/cp/ChangeLog: * cp-tree.h (TFF_XOBJ_FUNC): new flag to identify that an explicit object member function's parameters are being printed

[PATCH 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-08-31 Thread waffl3x via Gcc-patches
is FUNCTION_DECL but the lang_specific member is null? I have a null check for that case in DECL_IS_XOBJ_MEMBER_FUNC but I question if it's necessary. From e485a79ec5656e72ba46053618843c3d69331eab Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Thu, 31 Aug 2023 01:05:25 -0400 Subject: [PATCH] P0847R7 (deducing

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-08-25 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #15 from waffl3x --- Created attachment 55793 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55793=edit inital support for P0847 explicit-object-parameter Alright, I finalized something that I hope is worthy of criticism

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-08-20 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #13 from waffl3x --- I am finding myself realizing that implementing this as a member function and turning off member function bits seems to be more difficult than implementing it as a static function and implementing member

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-08-19 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #11 from waffl3x --- (In reply to Jonathan Wakely from comment #9) > If we're right about that, then I agree that a warning would be useful for > classes that have no such implicit conversion from S to S*. > > I think

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-08-19 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #7 from waffl3x --- struct S { int f(this S*) { return 5; } }; int main() { S s{}; return s.f(); } Here is my current progress, this code works. I have a good feeling that the rest is going to be easy

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-08-16 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #6 from waffl3x --- I've noticed the standard does call `this` a specifier, I will perhaps rework the code to just do parsing in cp_decl_specifier_seq. (In reply to Gašper Ažman from comment #5) > And of course by "this&

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-08-16 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #3 from waffl3x --- I have some elements working so far, I opted to implement parsing for `this` in cp_parser_parameter_declaration instead of in cp_parser_decl_specifier_seq because I didn't want to add another member

  1   2   >