aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Monakov <amonakov@ispras.ru>2017-04-20 10:23:38 +0000
committerAlexander Monakov <amonakov@ispras.ru>2017-04-20 10:23:38 +0000
commit1245be3dca820e8610d7a4f6c185c0491238c650 (patch)
treecb789d68e1230fd2e839e4a3ce81f706c8214fc8
parent4e3c698e59c581e4b4889c8f3a0127e46eb79cd0 (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@247018 138bc75d-0d04-0410-961f-82ee72b054a4
-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 5ded09b27fd..c908048f21b 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 19a85b6cd9a..5ee13b8984a 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