[Bug middle-end/79374] missing sometimes-uninitialized warning in switch statement
law at redhat dot com
gcc-bugzilla@gcc.gnu.org
Sat Feb 4 13:32:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79374
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |law at redhat dot com
Resolution|--- |DUPLICATE
--- Comment #2 from Jeffrey A. Law <law at redhat dot com> ---
To be more precise, conditional constant propagation optimistically ignores PHI
arguments associated with undefined values. That makes the PHI to select a
value of "rv" at the merge point before the return statement a degenerate with
the value 0.
At that point the path associated with the undefined value gets removed from
the CFG and thus there's no warning later.
GCC and Clang have significantly different philosophical approaches to
uninitialized warnings and as a result they do not always agree on when to
warn.
*** This bug has been marked as a duplicate of bug 44042 ***
More information about the Gcc-bugs
mailing list