[Bug c/67093] incorrect -Wnonnull text for execl family of functions
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 3 15:55:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67093
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Surely GCC only warns here because glibc adds the attribute to the execl
declaration, so the bug is in glibc.
GCC interprets the nonnull attribute to mean the argument *must* be non-null,
and even optimises based on that assumption. So the attribute should not be
used for recommendations, only requirements.
More information about the Gcc-bugs
mailing list