This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/22249] New: GCC does not reject an incompatible type declaration
- From: "neil at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jun 2005 13:19:57 -0000
- Subject: [Bug c/22249] New: GCC does not reject an incompatible type declaration
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I don't believe the standard requires the following to be rejected, but as a QOI
issue I believe it should be. The debatable point is whether you believe the
composite of the first two is specified by a function definition; if you do then
you must reject. GCC rejects it if the order of the first two is switched.
void r(x) int (*x)[2]; {}
void r();
void r(int (*x)[3]); /* Ideally rejected. */
Flags are e.g. -Wall -std=c99 -pedantic
--
Summary: GCC does not reject an incompatible type declaration
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: neil at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22249