[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 Mar 8 16:07:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79961
--- Comment #2 from Pedro Alves <palves at redhat dot com> ---
Yeah, I think it's too late, and it'd cause trouble with compatibility with
clang.
Note that the documentation for the attribute(format)
<https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/Common-Function-Attributes.html>
says:
"Since non-static C++ methods have an implicit this argument, the arguments of
such methods should be counted from two, not one, when giving values for
string-index and first-to-check."
but the documentation for the nonnull attribute doesn't say anything about it.
Maybe that bit could be factored out somehow, or copied, or xrefed.
More information about the Gcc-bugs
mailing list