This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/13038] New: no diagnostic for null pointer misuse


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]