diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-09-11 18:08:24 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-09-11 18:08:24 +0000 |
commit | 639d66a32a6869978e7c0b6954a9ff344640f2fe (patch) | |
tree | 26b32d4a7c2b46ee245615c638135bc13711d88f /gcc/doc | |
parent | 7c18bc4f98a644f236df1c1d1e30c63074b056d2 (diff) | |
download | gcc-639d66a32a6869978e7c0b6954a9ff344640f2fe.tar.gz |
2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61489
* doc/invoke.texi ([-Wmissing-field-initializers]): Update.
/cp
2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61489
* typeck2.c (process_init_constructor_record): Do not warn about
missing field initializer if EMPTY_CONSTRUCTOR_P (init).
/testsuite
2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61489
* g++.dg/warn/Wmissing-field-initializers-1.C: New.
* g++.old-deja/g++.other/warn5.C: Adjust.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 863b382e868..68e992d1d50 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -4912,6 +4912,14 @@ struct s @{ int f, g, h; @}; struct s x = @{ .f = 3, .g = 4 @}; @end smallexample +In C++ this option does not warn either about the empty @{ @} +initializer, for example: + +@smallexample +struct s @{ int f, g, h; @}; +s x = @{ @}; +@end smallexample + This warning is included in @option{-Wextra}. To get other @option{-Wextra} warnings without this one, use @option{-Wextra -Wno-missing-field-initializers}. |