Re: [PATCH] c++: ICE with -Wshadow and enumerator in template [PR99120]

2021-03-05 Thread Jason Merrill via Gcc-patches
On 3/5/21 11:44 AM, Marek Polacek wrote: We crash here, because in a template, an enumerator doesn't have a type until we've called finish_enum_value_list. But our -Wshadow implementation, check_local_shadow, is called when we pushdecl in build_enumerator, which takes place before finish_enum_va

[PATCH] c++: ICE with -Wshadow and enumerator in template [PR99120]

2021-03-05 Thread Marek Polacek via Gcc-patches
We crash here, because in a template, an enumerator doesn't have a type until we've called finish_enum_value_list. But our -Wshadow implementation, check_local_shadow, is called when we pushdecl in build_enumerator, which takes place before finish_enum_value_list. Bootstrapped/regtested on x86_64