Re: [PATCH] c++: Fix crash with broken deduction from {} [PR97895]

2020-11-19 Thread Jason Merrill via Gcc-patches
On 11/19/20 11:11 AM, Marek Polacek wrote: Unfortunately, the otherwise beautiful for (constructor_elt &elt : *CONSTRUCTOR_ELTS (init)) is not immune to an empty constructor, so we have to check CONSTRUCTOR_ELTS first. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? OK. gcc

[PATCH] c++: Fix crash with broken deduction from {} [PR97895]

2020-11-19 Thread Marek Polacek via Gcc-patches
Unfortunately, the otherwise beautiful for (constructor_elt &elt : *CONSTRUCTOR_ELTS (init)) is not immune to an empty constructor, so we have to check CONSTRUCTOR_ELTS first. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? gcc/cp/ChangeLog: PR c++/97895 * pt.c (