[Bug c/46936] turn __attribute__ ((nonnull (x))) into assert in debug mode

neleai at seznam dot cz gcc-bugzilla@gcc.gnu.org
Tue Nov 5 14:41:00 GMT 2013


--- Comment #3 from Ondrej Bilka <neleai at seznam dot cz> ---
> As per http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html, the
> annotation on the example function there "causes the compiler to check that, in > calls to my_memcpy, arguments dest and src are non-null."  Is this a 
> documentation bug, or does the functionality that you're asking for already exist?

Gcc does not check that. Also this is not documentation request but request to
add checks when _FORTIFY_SOURCE is defined.

This would also mostly solve following bug

More information about the Gcc-bugs mailing list