public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/63480] New: -Wmissing-field-initializers should not warn about intentionally empty initializers (or that should be a separate option)
@ 2014-10-08  4:31 josh at joshtriplett dot org
  2014-10-08  7:27 ` [Bug c/63480] " mpolacek at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: josh at joshtriplett dot org @ 2014-10-08  4:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63480

            Bug ID: 63480
           Summary: -Wmissing-field-initializers should not warn about
                    intentionally empty initializers (or that should be a
                    separate option)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: josh at joshtriplett dot org

-Wmissing-field-initializers warns if a positional initializer does not
initialize all fields.  However, it does so even if the initializer is {},
which is a common idiom to initialize the entire structure to zero.  Please
consider not warning in that specific case.  If anyone actually *wants* GCC to
warn in that case, perhaps that could go in a separate -Wempty-initializer.

Alternatively, if people *really* want -Wmissing-field-initializers to warn
about {}, could we have some other warning option that only warns about missing
field initializers with non-empty initializers?


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-10-09  8:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-08  4:31 [Bug c/63480] New: -Wmissing-field-initializers should not warn about intentionally empty initializers (or that should be a separate option) josh at joshtriplett dot org
2014-10-08  7:27 ` [Bug c/63480] " mpolacek at gcc dot gnu.org
2014-10-08  9:11 ` mpolacek at gcc dot gnu.org
2014-10-08  9:28 ` manu at gcc dot gnu.org
2014-10-08 10:13 ` mpolacek at gcc dot gnu.org
2014-10-08 10:13 ` mpolacek at gcc dot gnu.org
2014-10-09  8:26 ` mpolacek at gcc dot gnu.org
2014-10-09  8:27 ` mpolacek at gcc dot gnu.org

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