[Bug c/13038] New: no diagnostic for null pointer misuse
fjh at cs dot mu dot oz dot au
gcc-bugzilla@gcc.gnu.org
Thu Nov 13 14:28:00 GMT 2003
gcc versions 2.95, 3.2, and 3.3.1 all fail to issue a diagnostic for
the following source file, even with "-ansi -pedantic -Wall":
char *s = (int) (void *) 0;
But this is a straight-forward type error, and a diagnostic is required.
The bug seems to be that gcc is treating the RHS of the assignment as a
null pointer constant, which is wrong.
--
Summary: no diagnostic for null pointer misuse
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fjh at cs dot mu dot oz dot au
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13038
More information about the Gcc-bugs
mailing list