[Bug c++/95354] GCC misuse "nonnull-attribute" option and can not detect it as UB as well
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 27 04:50:10 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95354
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
No,
The place where nonnull attribute is not on the argument itself but rather on
the function.
See the document at:
https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Common-Function-Attributes.html#index-nonnull-function-attribute
THIS IS WHY GCC Is warning on that pointer and all.
More information about the Gcc-bugs
mailing list