This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25801] New: bad diagnostic for increment/decrement of pointer to incomplete array
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jan 2006 00:28:27 -0000
- Subject: [Bug c/25801] New: bad diagnostic for increment/decrement of pointer to incomplete array
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
extern int (*a)[];
void g(void) { a++; }
yields the diagnostics
t2.c: In function 'g':
t2.c:2: error: increment of pointer to unknown structure
t2.c:2: error: arithmetic on pointer to an incomplete type
This isn't a pointer to a structure, it's one to an array; and after giving the
first diagnostic, it's useless to go on and give the second as well.
--
Summary: bad diagnostic for increment/decrement of pointer to
incomplete array
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jsm28 at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25801