Re: [PATCH] c++: enum in generic lambda at global scope [PR105398]

2022-04-27 Thread Jason Merrill via Gcc-patches
On 4/27/22 13:00, Marek Polacek wrote: On Wed, Apr 27, 2022 at 11:47:02AM -0400, Jason Merrill wrote: On 4/27/22 08:59, Marek Polacek wrote: On Wed, Apr 27, 2022 at 08:24:54AM -0400, Patrick Palka wrote: On Tue, 26 Apr 2022, Marek Polacek via Gcc-patches wrote: We crash compiling this test s

Re: [PATCH] c++: enum in generic lambda at global scope [PR105398]

2022-04-27 Thread Marek Polacek via Gcc-patches
On Wed, Apr 27, 2022 at 11:47:02AM -0400, Jason Merrill wrote: > On 4/27/22 08:59, Marek Polacek wrote: > > On Wed, Apr 27, 2022 at 08:24:54AM -0400, Patrick Palka wrote: > > > On Tue, 26 Apr 2022, Marek Polacek via Gcc-patches wrote: > > > > > > > We crash compiling this test since r11-7993 which

Re: [PATCH] c++: enum in generic lambda at global scope [PR105398]

2022-04-27 Thread Jason Merrill via Gcc-patches
On 4/27/22 08:59, Marek Polacek wrote: On Wed, Apr 27, 2022 at 08:24:54AM -0400, Patrick Palka wrote: On Tue, 26 Apr 2022, Marek Polacek via Gcc-patches wrote: We crash compiling this test since r11-7993 which changed lookup_template_class_1 so that we only call tsubst_enum when !uses_temp

Re: [PATCH] c++: enum in generic lambda at global scope [PR105398]

2022-04-27 Thread Marek Polacek via Gcc-patches
On Wed, Apr 27, 2022 at 08:24:54AM -0400, Patrick Palka wrote: > On Tue, 26 Apr 2022, Marek Polacek via Gcc-patches wrote: > > > We crash compiling this test since r11-7993 which changed > > lookup_template_class_1 so that we only call tsubst_enum when > > > > !uses_template_parms (current_nonl

Re: [PATCH] c++: enum in generic lambda at global scope [PR105398]

2022-04-27 Thread Patrick Palka via Gcc-patches
On Tue, 26 Apr 2022, Marek Polacek via Gcc-patches wrote: > We crash compiling this test since r11-7993 which changed > lookup_template_class_1 so that we only call tsubst_enum when > > !uses_template_parms (current_nonlambda_scope ()) > > But here current_nonlambda_scope () is the global NAME

[PATCH] c++: enum in generic lambda at global scope [PR105398]

2022-04-26 Thread Marek Polacek via Gcc-patches
We crash compiling this test since r11-7993 which changed lookup_template_class_1 so that we only call tsubst_enum when !uses_template_parms (current_nonlambda_scope ()) But here current_nonlambda_scope () is the global NAMESPACE_DECL ::, which doesn't have a type, therefore is considered type-