Bug 58323

Summary: [-Wall] No warning when uninitialized integer
Product: gcc Reporter: tkhai
Component: cAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED DUPLICATE    
Severity: normal CC: manu
Priority: P3    
Version: unknown   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description tkhai 2013-09-05 11:42:32 UTC
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
Comment 1 Manuel López-Ibáñez 2013-09-07 17:53:17 UTC
99% sure that this is bug 18501

*** This bug has been marked as a duplicate of bug 18501 ***