[Bug c/25801] New: bad diagnostic for increment/decrement of pointer to incomplete array
jsm28 at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jan 16 00:28:00 GMT 2006
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
More information about the Gcc-bugs
mailing list