[Bug c/17129] New: all gcc fail to warn zero sized array.
ellson at research dot att dot com
gcc-bugzilla@gcc.gnu.org
Sat Aug 21 01:42:00 GMT 2004
gcc35 fails to generate error for writes to zero sized array. This error
is detected by Sun's and SGI's compilers.
ellson@ontap:~> gcc35 --version
gcc35 (GCC) 3.5.0 20040715 (Red Hat 3.5.0-0.7)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ellson@ontap:~> cat bug.c
int main ()
{
int array[0];
array[0] = 1;
array[2] = 2;
return 0;
}
ellson@ontap:~> gcc35 -Wall bug.c
ellson@ontap:~>
--
Summary: all gcc fail to warn zero sized array.
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ellson at research dot att dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17129
More information about the Gcc-bugs
mailing list