diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ded09b27fdfbf91b951f88e3cfed10b7285836b..c908048f21b46a70ad66b6c0b8022f7b5031f2e7 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 19a85b6cd9a37d9696d151fd48379c7afc02a662..5ee13b8984a8626f2d2b57841b8aa93a4fba3553 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