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/50624] New: detecting array overflows regressed


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50624

             Bug #: 50624
           Summary: detecting array overflows regressed
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: andi-gcc@firstfloor.org


Created attachment 25424
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25424
overflow tester

The attached program tests 5 different array overflows that the compiler
should be able to detect at compile time.

gcc 4.5 detects 2 out of 5 with -O2 -Wall:

overflow.c:14:7: warning: array subscript is above array bounds
overflow.c:22:12: warning: array subscript is above array bounds


Current mainline detects zero.

gcc version 4.7.0 20111002 (experimental) (GCC)


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