This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/41027] Missing warning from -Wc++-compat
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 25 Jul 2017 18:04:12 +0000
- Subject: [Bug c/41027] Missing warning from -Wc++-compat
- Auto-submitted: auto-generated
- References: <bug-41027-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41027
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |egallager at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
gcc now prints this warning for the testcase:
$ /usr/local/bin/gcc -c -Wc++-compat 41027.c
41027.c: In function ‘h’:
41027.c:10:11: warning: uninitialized const member in ‘struct f’ is invalid in
C++ [-Wc++-compat]
struct f h;
^
41027.c:3:12: note: ‘a’ should be initialized
const int a;
^
So apparently this was fixed somewhere along the way.