This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/33327] New: gcc 4.{1,2} fail warn uninitialized
- From: "mark at hindley dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Sep 2007 21:52:54 -0000
- Subject: [Bug c/33327] New: gcc 4.{1,2} fail warn uninitialized
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc 4.1 and 4.2 fail to warn about an uninitialized variable in the following
testcase. gcc 3.3 correctly warns.
int
foo(int i)
{
int err;
if (i) {
err = 1;
}
return err;
}
Verified on
gcc-4.2 (GCC) 4.2.1 (Debian 4.2.1-3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
Summary: gcc 4.{1,2} fail warn uninitialized
Product: gcc
Version: 4.1.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mark at hindley dot org dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33327