[LLVMbugs] [Bug 13190] attribute((nonnull)) warnings don't work for function pointers

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jun 26 13:15:14 PDT 2013


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

Nick Lewycky <nlewycky at google.com> changed:

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

--- Comment #6 from Nick Lewycky <nlewycky at google.com> ---
Looks like this one got fixed somewhere along the way:

$ echo 'void (*bar)(void *x) __attribute__((nonnull));
> 
> int main(int argc, char *argv[])
> {
> bar(0);
> return 0;
> }
> ' | clang -x c++ -
<stdin>:5:6: warning: null passed to a callee which requires a non-null
argument
      [-Wnonnull]
bar(0);
    ~^

-- 
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/20130626/7eb82406/attachment.html>


More information about the llvm-bugs mailing list