PR c/13282
commit3304fb1c75b739d6f91161842c6e0e0a4c7abaa3
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Aug 2004 11:23:23 +0000 (6 11:23 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Aug 2004 11:23:23 +0000 (6 11:23 +0000)
tree2423669b264154305c8f708c1b78d38c7f40ddd2
parentf1f85ed28b551fb90cb6b199cbef99a3d4007016
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85638 138bc75d-0d04-0410-961f-82ee72b054a4
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]