Re: [PATCH] c++: Fix ICE in check_local_shadow with enum [PR95560]

2020-06-16 Thread Jason Merrill via Gcc-patches
On 6/15/20 9:20 PM, Marek Polacek wrote: On Thu, Jun 11, 2020 at 03:32:14PM -0400, Jason Merrill wrote: On 6/10/20 5:11 PM, Marek Polacek wrote: Another indication that perhaps this warning is emitted too early. We crash because same_type_p gets a null type: we have an enumerator without a fix

Re: [PATCH] c++: Fix ICE in check_local_shadow with enum [PR95560]

2020-06-15 Thread Marek Polacek via Gcc-patches
On Thu, Jun 11, 2020 at 03:32:14PM -0400, Jason Merrill wrote: > On 6/10/20 5:11 PM, Marek Polacek wrote: > > Another indication that perhaps this warning is emitted too early. We > > crash because same_type_p gets a null type: we have an enumerator > > without a fixed underlying type and finish_e

Re: [PATCH] c++: Fix ICE in check_local_shadow with enum [PR95560]

2020-06-11 Thread Jason Merrill via Gcc-patches
On 6/11/20 3:32 PM, Jason Merrill wrote: On 6/10/20 5:11 PM, Marek Polacek wrote: Another indication that perhaps this warning is emitted too early.  We crash because same_type_p gets a null type: we have an enumerator without a fixed underlying type and finish_enum_value_list hasn't yet run.  S

Re: [PATCH] c++: Fix ICE in check_local_shadow with enum [PR95560]

2020-06-11 Thread Jason Merrill via Gcc-patches
On 6/11/20 3:34 PM, Jason Merrill wrote: On 6/11/20 3:32 PM, Jason Merrill wrote: On 6/10/20 5:11 PM, Marek Polacek wrote: Another indication that perhaps this warning is emitted too early.  We crash because same_type_p gets a null type: we have an enumerator without a fixed underlying type and

Re: [PATCH] c++: Fix ICE in check_local_shadow with enum [PR95560]

2020-06-11 Thread Jason Merrill via Gcc-patches
On 6/10/20 5:11 PM, Marek Polacek wrote: Another indication that perhaps this warning is emitted too early. We crash because same_type_p gets a null type: we have an enumerator without a fixed underlying type and finish_enum_value_list hasn't yet run. So check if the type is null before calling

[PATCH] c++: Fix ICE in check_local_shadow with enum [PR95560]

2020-06-10 Thread Marek Polacek via Gcc-patches
Another indication that perhaps this warning is emitted too early. We crash because same_type_p gets a null type: we have an enumerator without a fixed underlying type and finish_enum_value_list hasn't yet run. So check if the type is null before calling same_type_p. (This is a regression and th