On 06/04/14 10:47, S. Gilles wrote:
PR c/53119
c/
* c-typeck.c (push_init_level, process_init_element,
pop_init_level): Correct check for zero initialization, move
missing brace warning to respect zero initialization.
* gcc.dg/pr53119.c: New testcase.
Than
On Wed, Jun 04, 2014 at 03:15:02PM +0200, Marek Polacek wrote:
> On Mon, Jun 02, 2014 at 12:58:53AM -0400, S. Gilles wrote:
>
> Thanks for tackling this.
>
> > @@ -6858,6 +6858,9 @@
> > /* 1 if this constructor is erroneous so far. */
> > static int constructor_erroneous;
> >
> > +/* 1 if th
On Mon, Jun 02, 2014 at 12:58:53AM -0400, S. Gilles wrote:
Thanks for tackling this.
> @@ -6858,6 +6858,9 @@
> /* 1 if this constructor is erroneous so far. */
> static int constructor_erroneous;
>
> +/* 1 if this constructor is the universal zero initializer { 0 } */
". */" at the end of
This patch addresses PR 53119 (-Wmissing-braces wrongly warns about
universal zero initializer {0}). As a result, initializations in C of
the form struct foo a = { 0 }; will not trigger warnings from
-Wmissing-braces or -Wmissing-field-initializers.
The detection for constructor_zeroinit has been