https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86568

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2020-06-03 00:00:00         |2025-7-13

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
For the comment 0 testcase trunk prints this:

null.cc: In function 'int main()':
null.cc:9:4: warning: argument 2 null where non-null expected [-Wnonnull]
    9 |   f(0, 0);
      |   ~^~~~~~
null.cc:1:6: note: in a call to function 'void f(void*, void*)' declared
'nonnull'
    1 | void f(void*, void*) __attribute__((nonnull(2)));
      |      ^
null.cc:10:8: warning: argument 1 null where non-null expected [-Wnonnull]
   10 |   A().f(0, 0);
      |   ~~~~~^~~~~~
null.cc:4:8: note: in a call to function 'void A::f(void*, void*)' declared
'nonnull'
    4 |   void f(void*, void*) __attribute__((nonnull(2)));
      |        ^


Which is ... different, I guess. It just highlights the entire function call
now, but still not the parameter.

Reply via email to