[LLVMbugs] [Bug 17723] New: Implement gcc's -Waddress

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 29 08:39:15 PDT 2013


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

            Bug ID: 17723
           Summary: Implement gcc's -Waddress
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This is a useful gcc warning that clang didn't give me:

../../third_party/WebKit/Source/core/rendering/RenderObject.cpp:1382:87:error:
the address of 'parentRenderFlowThread' will always evaluate as 'true'
[-Werror=address]


Nicos-MacBook-Pro:src thakis$ cat test.cc
int main() {
  int a;
  if (&a)
    a = 4;
}

Actual: Nothing:

Nicos-MacBook-Pro:src thakis$ clang -Weverything -c test.cc
Nicos-MacBook-Pro:src thakis$ 

Expected: "Address of variable is always true".

-- 
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/20131029/23acb9f4/attachment.html>


More information about the llvm-bugs mailing list