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.