[Bug c/45493] New: -Wuninitialized does not warn
tadhunt at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Sep 2 03:41:00 GMT 2010
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
More information about the Gcc-bugs
mailing list