Compiling the following code with -O2 -W -Wall, gcc-3.2 gives a warning: p.c: In function `bar': p.c:4: warning: `res' might be used uninitialized in this function
No open branch does, anymore. p.c: int bar(int foo) { int res; if (foo) { } else { res = 0; } return res; } int main() { return bar(1); } This PR seems similar to PR22456, but this code isn't a loop. If it really is the same, I guess WONTFIX. -- Summary: [4.3/4.4/4.5 Regression] "Missing" uninitialized warning Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hp at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40469