diff options
author | Marek Polacek <polacek@redhat.com> | 2023-06-08 13:52:11 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2023-06-09 10:22:42 -0400 |
commit | 0f8f1dee851c23bce19977b2531cf69b4da9f88f (patch) | |
tree | 63c1bb8f6ae32770eb60ad9b9c6e669274741e0f | |
parent | 55fcaa9a8bd9c8ce97ca929fc902c88cf92786a0 (diff) | |
download | gcc-0f8f1dee851c23bce19977b2531cf69b4da9f88f.zip gcc-0f8f1dee851c23bce19977b2531cf69b4da9f88f.tar.gz gcc-0f8f1dee851c23bce19977b2531cf69b4da9f88f.tar.bz2 |
doc: Clarification for -Wmissing-field-initializers
The manual is incorrect in saying that the option does not warn
about designated initializers, which it does in C++. Whether the
divergence in behavior is desirable is another thing, but let's
at least make the manual match the reality.
PR c/39589
PR c++/96868
gcc/ChangeLog:
* doc/invoke.texi: Clarify that -Wmissing-field-initializers doesn't
warn about designated initializers in C only.
-rw-r--r-- | gcc/doc/invoke.texi | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 6d08229..0870f7a 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -9591,8 +9591,9 @@ struct s @{ int f, g, h; @}; struct s x = @{ 3, 4 @}; @end smallexample -This option does not warn about designated initializers, so the following -modification does not trigger a warning: +@c It's unclear if this behavior is desirable. See PR39589 and PR96868. +In C this option does not warn about designated initializers, so the +following modification does not trigger a warning: @smallexample struct s @{ int f, g, h; @}; |