[Bug c++/69892] Missing -Wuninitialized warning
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Feb 21 20:42:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69892
--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
The example in comment #3 shows a missed optimization:
if (valid_3(D) != 0)
could be optimized to if(true) or if(false), whichever is most convenient
(__builtin_unreachable() might also be a possibility).
(the early warning works here because the uninitialized variable is used in a
GIMPLE_COND, not a PHI)
More information about the Gcc-bugs
mailing list