http://llvm.org/bugs/show_bug.cgi?id=9503

           Summary: Misleading "operand is always zero" message
           Product: clang
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


On this code:

for (i=0; i < length; i += 3) {
   for (j = i; j < (i + 3); j++) {

the analyzer complains:

The left operand to '+' is always 0
1. The value 0 is assigned to 'i'
2. The left operand to '+' is always 0

talking about the expression (i + 3).  It doesn't seem to understand that the
variable i is going to be changed in a loop.

This is using the "Build & Analyze" function of Xcode v3.2.6.

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to