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
This commit is contained in:
Alexander Monakov 2017-04-20 13:23:38 +03:00 committed by Alexander Monakov
parent aa90195aed
commit 7041308f60
2 changed files with 15 additions and 1 deletions

View File

@ -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.

View File

@ -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