[LLVMbugs] [Bug 16074] Implement gcc's -Waddress (warn on array-to-boolean, address-of-variable-to-boolean, etc)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Feb 25 19:32:14 PST 2014


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

rtrieu at google.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |rtrieu at google.com
         Resolution|---                         |FIXED

--- Comment #3 from rtrieu at google.com ---
Committed at r202216.

-Wbool-conversion has been extended and -Wtautological-pointer-compare have
been created.  Most cases caught by gcc's -Waddress is now caught by Clang's
warnings.

I believe that gcc's -Waddress will now be covered by Clang's
-Wbool-conversion, -Wtautological-pointer-compare, and -Wstring-compare. 
-Wbool-conversion contains an extra warning (bool false to null pointer) not in
gcc's -Waddress.  In addition, Clang does not warn on the following case, but
gcc does:

void foo();
if (&foo) {}

Clang would warn if the address of operator was not there.

-- 
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/20140226/5996b7be/attachment.html>


More information about the llvm-bugs mailing list