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

             Bug #: 13673
           Summary: false positive: division by zero with unsigned
                    denominator
           Product: clang
           Version: 3.1
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


Created attachment 9098
  --> http://llvm.org/bugs/attachment.cgi?id=9098
division by zero false positive example code.

The following attachment produces a false positive for division by zero if 'b'
is declared to be 'unsigned int' but no warning is generated if 'b' is declared
to be 'int'. 


> clang --analyze cc.c
cc.c:18:8: warning: Division by zero
        c = a / b[i];
            ~~^~~~~~
1 warning generated.
> clang --version
clang version 3.1 (branches/release_31)
Target: i386-portbld-freebsd8.3
Thread model: posix
>

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