re PR c/13282 (A "-Wno..." switch to turn off "missing initializer" warnings)
authorRichard Sandiford <rsandifo@redhat.com>
Fri, 6 Aug 2004 11:23:23 +0000 (11:23 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 6 Aug 2004 11:23:23 +0000 (11:23 +0000)
commiteaac467945c87292784a1773c911f649e340136a
tree2423669b264154305c8f708c1b78d38c7f40ddd2
parent155cb61615af89497814ef6c2685e2dfd098f2f7
re PR c/13282 (A "-Wno..." switch to turn off "missing initializer" warnings)

PR c/13282
* c.opt (Wmissing-field-initializers): New option.
* c-opts.c (c_common_post_options): Make -Wextra turn it on by default.
* c-typeck.c (pop_init_level): Guard the missing field warning with
warn_missing_field_initializers rather than extra_warnings.
* doc/invoke.texi (-Wmissing-field-initializers): Document, moving
some of the explanation from...
(-Wextra): ...here.  Say that the missing field warning can be
seperately controlled by -Wmissing-field-initializers.

cp/
* typeck2.c (process_init_constructor): Guard the missing field warning
with warn_missing_field_initializers rather than extra_warnings.

testsuite/
* gcc.dg/missing-field-init-[12].c: New tests.
* g++.dg/warn/missing-field-init-[12].C: New tests.

From-SVN: r85638
12 files changed:
gcc/ChangeLog
gcc/c-opts.c
gcc/c-typeck.c
gcc/c.opt
gcc/cp/ChangeLog
gcc/cp/typeck2.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/missing-field-init-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/missing-field-init-2.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/missing-field-init-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/missing-field-init-2.c [new file with mode: 0644]