Re: [PATCH] c++: processing_template_decl vs template depth [PR103408]

2021-12-15 Thread Jason Merrill via Gcc-patches
On 12/15/21 09:09, Jakub Jelinek wrote: On Wed, Dec 15, 2021 at 08:58:45AM -0500, Patrick Palka wrote: Oops, thanks Jakub, I didn't realize we don't run the testsuite with -std=c++23 yet. I guess it'd be too expensive to add another std to the testing matrix at this point, but I wonder if the

Re: [PATCH] c++: processing_template_decl vs template depth [PR103408]

2021-12-15 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 15, 2021 at 08:58:45AM -0500, Patrick Palka wrote: > Oops, thanks Jakub, I didn't realize we don't run the testsuite with > -std=c++23 yet. > > I guess it'd be too expensive to add another std to the testing matrix > at this point, but I wonder if the test harness should at least run

Re: [PATCH] c++: processing_template_decl vs template depth [PR103408]

2021-12-15 Thread Patrick Palka via Gcc-patches
On Wed, 15 Dec 2021, Jakub Jelinek wrote: > On Mon, Dec 13, 2021 at 04:28:26PM -0500, Patrick Palka via Gcc-patches wrote: > > * g++.dg/concepts/diagnostic18.C: Expect a "constraints on a > > non-templated function" error. > > * g++.dg/cpp23/auto-fncast10.C: New test. > > This test

Re: [PATCH] c++: processing_template_decl vs template depth [PR103408]

2021-12-15 Thread Jakub Jelinek via Gcc-patches
On Mon, Dec 13, 2021 at 04:28:26PM -0500, Patrick Palka via Gcc-patches wrote: > * g++.dg/concepts/diagnostic18.C: Expect a "constraints on a > non-templated function" error. > * g++.dg/cpp23/auto-fncast10.C: New test. This test fails: +FAIL: g++.dg/cpp23/auto-fncast11.C

Re: [PATCH] c++: processing_template_decl vs template depth [PR103408]

2021-12-13 Thread Jason Merrill via Gcc-patches
as processing_template_decl, or use current_template_parms directly. OK whichever way you prefer. -- >8 -- Subject: [PATCH] c++: processing_template_decl vs template depth [PR103408] We use processing_template_decl in two slightly different ways: as a flag to signal that we're dealing with templated tr

Re: [PATCH] c++: processing_template_decl vs template depth [PR103408]

2021-12-13 Thread Patrick Palka via Gcc-patches
working the calculation of friend_depth in make_friend_class. Also replace processing_template_decl with current_template_decl in PROCESSING_REAL_TEMPLATE_DECL_P, start_preparsed_function and push_template_decl. These were missed in the original patch because I hadn't considered grepping

Re: [PATCH] c++: processing_template_decl vs template depth [PR103408]

2021-12-12 Thread Jason Merrill via Gcc-patches
On 12/10/21 14:12, Patrick Palka wrote: We use processing_template_decl in two slightly different ways: as a flag to signal that we're dealing with templated trees, and its magnitude is also used as a proxy for the current syntactic template depth. This overloaded meaning of p_t_d is

[PATCH] c++: processing_template_decl vs template depth [PR103408]

2021-12-10 Thread Patrick Palka via Gcc-patches
We use processing_template_decl in two slightly different ways: as a flag to signal that we're dealing with templated trees, and its magnitude is also used as a proxy for the current syntactic template depth. This overloaded meaning of p_t_d is conceptually confusing and leads to bugs that we end