This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13038] New: no diagnostic for null pointer misuse
- From: "fjh at cs dot mu dot oz dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Nov 2003 14:28:07 -0000
- Subject: [Bug c/13038] New: no diagnostic for null pointer misuse
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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