public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-1657] doc: Clarification for -Wmissing-field-initializers
@ 2023-06-09 14:23 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2023-06-09 14:23 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0f8f1dee851c23bce19977b2531cf69b4da9f88f

commit r14-1657-g0f8f1dee851c23bce19977b2531cf69b4da9f88f
Author: Marek Polacek <polacek@redhat.com>
Date:   Thu Jun 8 13:52:11 2023 -0400

    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.

Diff:
---
 gcc/doc/invoke.texi | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6d08229ce40..0870f7aff93 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; @};

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-09 14:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09 14:23 [gcc r14-1657] doc: Clarification for -Wmissing-field-initializers Marek Polacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).