This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61489] Wrong warning with -Wmissing-field-initializers.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 14 Jun 2014 12:01:44 +0000
- Subject: [Bug c++/61489] Wrong warning with -Wmissing-field-initializers.
- Auto-submitted: auto-generated
- References: <bug-61489-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61489
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-06-14
Ever confirmed|0 |1
Severity|normal |enhancement
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Deniz Bahadir from comment #5)
> Because of several internet-sources, like the one I cited, I always thought
> that the cases of addr3 and addr7 were the prefered way of explicitely
> forcing zero-initialization of all struct members (especially if the number
> of struct-members are subject to change in the future).
That's the preferred way in C, where at least one initializer is needed, but
not in C++.
> If I understand you correctly, a better/cleaner way which achieves the exact
> same is using the cases of addr2 and addr6.
Yes.
> Then I would rephrase my original statement and suggest that no warning will
> be issued for cases of addr2, addr6 and addr9.
I agree with that suggestion.