aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexander Monakov <amonakov@ispras.ru>2017-04-20 13:23:38 +0300
committerAlexander Monakov <amonakov@gcc.gnu.org>2017-04-20 13:23:38 +0300
commit7041308f607f80a2d5c00d01e7e7c907722f86e7 (patch)
treecb789d68e1230fd2e839e4a3ce81f706c8214fc8 /gcc
parentaa90195aedfa348284c6e4e8ce59dc1b734f1d71 (diff)
downloadgcc-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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/doc/invoke.texi10
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