Implement C23 const-preserving standard library macros

Florian Weimer fweimer@redhat.com
Mon Jan 19 13:02:53 GMT 2026


* Andreas Schwab:

> On Nov 18 2025, Joseph Myers wrote:
>
>> C23 makes various standard library functions, that return a pointer
>> into an input array, into macros that return a pointer to const when
>> the relevant argument passed to the macro is a pointer to const.
>
> Shouldn't this be disabled when compiling with -std=gnu17?

Siddhesh and I discussed this for a bit.

They should be disabled for !__STRICT_ANSI__, which includes -std=gnu17.

Who's going to send a patch?

Thanks,
Florian



More information about the Libc-alpha mailing list