This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12153] New: uninitialized use not spotted in "T x = x;"
- From: "simon dot marshall at misys dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2003 13:50:43 -0000
- Subject: [Bug c/12153] New: uninitialized use not spotted in "T x = x;"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12153
Summary: uninitialized use not spotted in "T x = x;"
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: simon dot marshall at misys dot com
CC: gcc-bugs at gcc dot gnu dot org
With the program:
#include <stdio.h>
int main ()
{
int x = x;
printf ("x=%d\n", x);
return 0;
}
gcc -O -W -Wall does not report the use of x before initialisation (as it would
at the printf() if it had been "int x;").
Obscure I know, but we had a C++ code typo of this form which gcc should have
spotted.