On Thu, Jan 29, 2015 at 09:50:45PM +0100, Marek Polacek wrote: > Here the problem is that we issue a bogus "missing initializer" warning > even for zero-initializer "{ 0 }". So in case we're sure we have such > a zero-initializer, suppress the warning. If the constructor has a single > element which is not zero, don't set anything; it might be a constructor > from another init level, which is checked at a different time. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2015-01-29 Marek Polacek <pola...@redhat.com> > > PR c/64709 > * c-typeck.c (pop_init_level): If constructor_elements has > exactly one element with integer_zerop value, set constructor_zeroinit > to 1. Remove braces around warning_init call. > > * gcc.dg/pr64709.c: New test.
Ok, thanks. Jakub