[Bug c/19430] New: Missing warning
terra at gnome dot org
gcc-bugzilla@gcc.gnu.org
Thu Jan 13 20:05:00 GMT 2005
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
More information about the Gcc-bugs
mailing list