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!)