[LLVMbugs] [Bug 9284] New: -Warray-bounds too eager on variable-length arrays

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Feb 21 22:32:05 PST 2011


           Summary: -Warray-bounds too eager on variable-length arrays
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu


int f(bool b) {
  float totals[3 + (b ? 0 : 1)];
  if (!b)
    totals[3] = 0;

Warns about `totals[3]` being out-of-bounds, which is wrong.

This breaks the webkit build.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list