GCC accepts:
extern struct S x;
void foo() { (void)x; }

But correctly rejects:

extern struct S x;
void foo() { x; }

Comeau rejects both in c99 mode.


-- 
           Summary: gcc does not reject invalid cast
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sabre at nondot dot org


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

Reply via email to