[Bug middle-end/30856] missing uninitialized variable warning (CCP)
manu at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Feb 7 21:29:00 GMT 2009
------- Comment #12 from manu at gcc dot gnu dot org 2009-02-07 21:29 -------
This is a duplicate of 18501. CCP assumes y is always 23.
Reordering passes just changes the set of false negatives/positives. For
example, if you move the warning before CCP, then you get a warning for this
case:
int f(int x)
{
int y;
int x = 42;
if (x == 42) y = 23;
return y;
}
A more complete analysis is here:
http://gcc.gnu.org/ml/gcc/2005-11/msg00028.html
And some random ideas are here:
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings#problem_ccp
How other compilers get this right? I don't know, but ideas and patches are
welcome.
*** This bug has been marked as a duplicate of 18501 ***
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |18501
Status|REOPENED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30856
More information about the Gcc-bugs
mailing list