When the first use of an uninitialized variable is inside a loop, no warning is generated when -Wuninitialized is turned on.
int main(void) { int len, i; for(i = 0; i < 5; i++) { printf("%d\n", len); // no warning! len = 10; } return 0; } -- Summary: -Wuninitialized does not warn Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tadhunt at gmail dot com GCC build triplet: x86_64-linux-gnu GCC host triplet: x86_64-linux-gnu GCC target triplet: x86_64-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45493