This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/36941] New: gcc does not reject invalid cast
- From: "sabre at nondot dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jul 2008 22:15:05 -0000
- Subject: [Bug c/36941] New: gcc does not reject invalid cast
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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