Implement C23 memset_explicit (bug 32378)

Joseph Myers josmyers@redhat.com
Fri Sep 26 20:29:05 GMT 2025


On Fri, 26 Sep 2025, Paul Eggert wrote:

> On 2025-09-26 12:39, Joseph Myers wrote:
> > Although the function is only declared here for __GLIBC_USE (ISOC23),
> > there's a reasonable argument for making it more widely available by
> > inclusion in __USE_MISC.
> 
> If I'm reading the source code correctly, FreeBSD makes memset_visible in
> <string.h> by default; you must define a strict-conformance-to-old-standards
> macro like _ANSI_SOURCE, _C99_SOURCE or _C11_SOURCE to make it vanish.
> 
> Shouldn't we do something similar? I'm not seeing the point of being shy here.

That's a key question for review of this patch.  Should it be visible for 
__USE_MISC as well as __GLIBC_USE (ISOC23)?

-- 
Joseph S. Myers
josmyers@redhat.com



More information about the Libc-alpha mailing list