Attribute for custom memset function
Chris Packham
judge.packham@gmail.com
Mon Sep 8 07:42:48 GMT 2025
Hi GCC,
For various reasons I find myself working with a few code bases that define
their own wrappers for memset(). Unfortunately these wrappers defeat gccs
ability to detect when the size of the pointer is passed instead of the
size of the pointed to object.
Is there any attribute I can set on the memset like functions that will let
gcc know to perform the same kinds of checks as the standard memset
function?
Thanks,
Chris
More information about the Gcc
mailing list