[LLVMbugs] [Bug 8403] New: Analyser false positive "The left operand to '+' is always 0"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 18 03:05:03 PDT 2010


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

           Summary: Analyser false positive "The left operand to '+' is
                    always 0"
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: magnus.reftel at gmail.com
                CC: llvmbugs at cs.uiuc.edu


The following test case triggers an analyser warning "The left operand to '+'
is always 0", but should not:


#include <stdio.h>

int main()
{
        int i;
        for(i=0; i<10; i++)
        {
                int j;
                for(j=0; j+1<i; j++)
                {
                        printf("i=%d, j=%d\n", i, j);
                }
        }
        return 0;
}

-- 
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