[Bug c++/79961] Should diagnose when '__nonnull__' attribute is applied to implicit this argument

palves at redhat dot com gcc-bugzilla@gcc.gnu.org
Wed Jun 3 22:49:40 GMT 2020


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

--- Comment #15 from Pedro Alves <palves at redhat dot com> ---
Darn typos.  Should be obvious that I meant:

Make it possible to write:

  void foo (int, const char *arg) __attribute__ ((__nonnull__ (arg)));

instead of this when foo is a class method:

  void foo (int, const char *arg) __attribute__ ((__nonnull__ (3)));

and this when it's a free function:

  void foo (int, const char *arg) __attribute__ ((__nonnull__ (2)));


More information about the Gcc-bugs mailing list