aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-20 10:23:38 +0000
committeramonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-20 10:23:38 +0000
commit60df2adb2a54c2f1f4b20cdd20af5455a6c14bb4 (patch)
treecb789d68e1230fd2e839e4a3ce81f706c8214fc8
parent498621e8159c1f494a9b8a5f2c3e5225c74ed242 (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: svn+ssh://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