diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2017-04-20 13:23:38 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2017-04-20 13:23:38 +0300 |
commit | 7041308f607f80a2d5c00d01e7e7c907722f86e7 (patch) | |
tree | cb789d68e1230fd2e839e4a3ce81f706c8214fc8 | |
parent | aa90195aedfa348284c6e4e8ce59dc1b734f1d71 (diff) | |
download | gcc-7041308f607f80a2d5c00d01e7e7c907722f86e7.zip gcc-7041308f607f80a2d5c00d01e7e7c907722f86e7.tar.gz gcc-7041308f607f80a2d5c00d01e7e7c907722f86e7.tar.bz2 |
doc: mention handling of {0} in -Wmissing-field-initializers (PR 71250)
PR other/71250
* doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
is suppressed for '{ 0 }' in C.
From-SVN: r247018
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ded09b..c908048 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-04-20 Alexander Monakov <amonakov@ispras.ru> + + PR other/71250 + * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning + is suppressed for '{ 0 }' in C. + 2017-04-20 Jakub Jelinek <jakub@redhat.com> * BASE-VER: Set to 8.0.0. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 19a85b6..5ee13b8 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -6220,7 +6220,15 @@ 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 @{ @} +In C this option does not warn about the universal zero initializer +@samp{@{ 0 @}}: + +@smallexample +struct s @{ int f, g, h; @}; +struct s x = @{ 0 @}; +@end smallexample + +Likewise, in C++ this option does not warn about the empty @{ @} initializer, for example: @smallexample |