[LLVMbugs] [Bug 15489] no warning for bool compared to out-of-range constant

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 11 12:32:07 PDT 2013


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

David Blaikie <dblaikie at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dblaikie at gmail.com
         Resolution|---                         |WORKSFORME

--- Comment #1 from David Blaikie <dblaikie at gmail.com> ---
scratch.cpp:3:14: warning: comparison of constant -1 with expression of type
'bool' is always false
      [-Wtautological-constant-out-of-range-compare]
    return v == -1;
           ~ ^  ~~

scratch.cpp:8:15: warning: comparison of constant -1 with expression of type
'bool' is always false
      [-Wtautological-constant-out-of-range-compare]
    return !p == -1; // evil half-refactoring ...
           ~~ ^  ~~

-- 
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/20130311/93e542a4/attachment.html>


More information about the llvm-bugs mailing list