[Bug middle-end/63451] New: bad location for the condition in for-loops
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Oct 3 12:44:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63451
Bug ID: 63451
Summary: bad location for the condition in for-loops
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: manu at gcc dot gnu.org
int
f (int i, int j)
{
unsigned int c = 0;
if (i < j)
{
unsigned int n;
for (unsigned int i = 0;
i < n; i++)
{
c++;
}
}
return c;
}
$ cc1 -O1 -Wall -std=c99 test.c
test.c:8:7: warning: ‘n’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
for (unsigned int i = 0;
^
More information about the Gcc-bugs
mailing list