Command line:
gcc -O2 -fwrapv -Wall -c testcase.c
or
gcc -O3 -fwrapv -Wall -c testcase.c

Tested revisions:
trunk r156604 - warns
trunk r153685 - warns
4.4 r156256 - silent
4.4.2 (gentoo) - silent
4.3.4 (gentoo) - silent

Output:
$ gcc-4.5.0-alpha20100204 -O2 -fwrapv -Wall -c testcase.c
testcase.c: In function ‘foo’:
testcase.c:9:9: warning: array subscript is below array bounds


-- 
           Summary: invalid "warning: array subscript is below array bounds"
                    with -fwrapv
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz


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

Reply via email to