mirror of git://gcc.gnu.org/git/gcc.git
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:
parent
aa90195aed
commit
7041308f60
|
|
@ -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>
|
2017-04-20 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* BASE-VER: Set to 8.0.0.
|
* BASE-VER: Set to 8.0.0.
|
||||||
|
|
|
||||||
|
|
@ -6220,7 +6220,15 @@ struct s @{ int f, g, h; @};
|
||||||
struct s x = @{ .f = 3, .g = 4 @};
|
struct s x = @{ .f = 3, .g = 4 @};
|
||||||
@end smallexample
|
@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:
|
initializer, for example:
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue