http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58323
Bug ID: 58323
Summary: [-Wall] No warning when uninitialized integer
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tkhai at yandex dot ru
Hi,
the following example compiles without warnings:
$ cat a.c
int func (int p)
{
int x;
if (p != 0)
x = 1;
return x;
}
$ gcc -c a.c -Wall
(no messages)
According to Ian Lance Taylor, this is a BUG:
http://gcc.gnu.org/ml/gcc/2013-09/msg00033.html
My gcc version is 4.4.5. I can't try newer versions.
Kirill