This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/17129] New: all gcc fail to warn zero sized array.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]