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

brooks at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 24 04:05:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46936

Brooks Moses <brooks at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brooks at gcc dot gnu.org

--- Comment #2 from Brooks Moses <brooks at gcc dot gnu.org> ---
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?

(My guess is that this is a documentation bug.  If so, a patch to fix it may
call some attention to this feature request!)



More information about the Gcc-bugs mailing list