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/31871] New: C99 failure to diagnose non-integer cast


Casts to "void *" are not permitted in integer constant expressions.

Therefore this code violates constraint 6.7.5.2p2 of C99 (C90 is u.b.) and so
must be diagnosed.

extern int c[1 + ((int) (void *) 0)];


-- 
           Summary: C99 failure to diagnose non-integer cast
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: neil at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31871


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