[Bug c++/19808] miss a warning about uninitialized members in constructor
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Sep 27 20:29:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-05-09 00:52:15 |2014-9-27
CC| |mpolacek at gcc dot gnu.org,
| |paolo.carlini at oracle dot com
--- Comment #21 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
I just got hit by this bug. This can obviously be warned in the FE as clang
does:
test.cc:4:11: warning: field 'j' is uninitialized when used here
[-Wuninitialized]
S() : i(j), j(1) {}
^
simply by marking the members somehow as initialized or not, and when using
them realizing that they are still uninitialized.
Marek, Paolo, Jason? Any idea how to do this?
More information about the Gcc-bugs
mailing list