This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30575] New: Missing warning about unitialized variable
- From: "muntyan at tamu dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jan 2007 14:37:18 -0000
- Subject: [Bug c/30575] New: Missing warning about unitialized variable
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code doesn't produce a warning when compiled with gcc-4.1.2.
gcc-3.4 does warn about it.
#include <stdio.h>
int func (void)
{
return 0;
}
int main (void)
{
int foo;
if (func ())
foo = 8;
printf ("%d\n", foo);
return 0;
}
--
Summary: Missing warning about unitialized variable
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: muntyan at tamu dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30575