Implement C23 memset_explicit (bug 32378)

Joseph Myers josmyers@redhat.com
Tue Sep 30 15:33:45 GMT 2025


On Sun, 28 Sep 2025, Paul Eggert wrote:

> If __USE_MISC is the wrong symbol (which I doubt), then use a different one.
> The point is that memset_explicit should be visible unless the user asks to
> check to an older API by using something like -std=c99 without defining
> _GNU_SOURCE. That is what FreeBSD does; why should we differ?

If the user is using GCC 15 or later (or any compiler defaulting to C23 or 
a later language version), C23 functions *will* be visible by default, 
unless the user explicitly chose an older version of C, because features.h 
uses __STDC_VERSION__ to determine the base level of standard C library 
features to declare.

-- 
Joseph S. Myers
josmyers@redhat.com



More information about the Libc-alpha mailing list