https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95354
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Allowing the attribute on individual parameters might be nice though. I hate the fact that for C++ member functions the first parameter is the implicit 'this' pointer which always has to be non-null anyway.