[LLVMbugs] [Bug 18796] New: No -Wtautological warning for comparison (unsigned < 0L)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Feb 10 13:13:52 PST 2014


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

            Bug ID: 18796
           Summary: No -Wtautological warning for comparison (unsigned <
                    0L)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: chengniansun at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Clang does not warn the following case. However, if I change "0L" to "0", clang
warns. 

$: cat s.c 
int fn(unsigned a) {
  return a < 0L;
}
$: clang-trunk -Wtautological-compare -c s.c 
$: clang-trunk --version
clang version 3.5 (trunk 200859)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140210/ea62f21e/attachment.html>


More information about the llvm-bugs mailing list