Bug 58323 - [-Wall] No warning when uninitialized integer
Summary: [-Wall] No warning when uninitialized integer
Status: RESOLVED DUPLICATE of bug 18501
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-05 11:42 UTC by tkhai
Modified: 2013-09-07 17:53 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***