This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/19430] New: Missing warning
- From: "terra at gnome dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2005 20:04:58 -0000
- Subject: [Bug c/19430] New: Missing warning
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
the program below should result in a warning that "j" might be used
uninitialized. If the "baz" call is replaced with an explicit assignment
to "j" a warning is generated as expected.
> gcc-3.4.2 -c -Wall -O2 ~/foo.c
(stunning silence)
extern int bar (int);
extern void baz (int *);
int
foo (int i)
{
int j;
if (bar (i)) {
// These should do the same with respect to `j':
baz (&j);
// j = 1;
} else {
}
return j;
}
--
Summary: Missing warning
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: terra at gnome dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: sparc-sun-solaris2.8, i586-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19430