[Bug c++/42000] missing -Wuninitialized warning on a user-defined class ctor
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 7 17:37:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42000
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-02-07
Ever confirmed|0 |1
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
With the top of trunk (GCC 7) the test case in comment #0 isn't diagnosed with
-O2 or at any other optimization level.
I suspect this does fall under one of the existing -Wuninitialized bugs. I'm
not sure bug 2972 covers this case. Just quickly eyeballing the patch in bug
19808, I don't think it's meant to detect this problem either since it's
front-end only solution focused solely on dependencies between members in ctor
initializer lists.
I'll confirm this for now and if someone finds a pre-existing duplicate it can
be closed then.
More information about the Gcc-bugs
mailing list