with -O2 -Wall:

void f (int m, int n)
{
  int j;

  for (j = m; j < m + 10 && j < n; j ++)
    do_something (j);

}

t.c:2: warning: assuming signed overflow does not occur when assuming that (X +
c) >= X is always true

(also note useless line number)


-- 
           Summary: [4.3 regression] spurious  warning: assuming signed
                    overflow does not occur when assuming that (X + c) >= X
                    is always true
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at depni dot sinp dot msu dot ru


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

Reply via email to