Re: [PATCH] c++: Reject union std::initializer_list [PR102434]

2022-01-31 Thread Jason Merrill via Gcc-patches
On 1/28/22 20:21, Marek Polacek wrote: Weird things are going to happen if you define your std::initializer_list as a union. In this case, we crash in output_constructor_regular_field. Let's not allow such a definition in the first place. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for t

[PATCH] c++: Reject union std::initializer_list [PR102434]

2022-01-28 Thread Marek Polacek via Gcc-patches
Weird things are going to happen if you define your std::initializer_list as a union. In this case, we crash in output_constructor_regular_field. Let's not allow such a definition in the first place. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? PR c++/102434 gcc/cp/Chan