Re: git: 8d29d2429649 - main - libc: Restore prior C23 include guards

From: Dag-Erling_Smørgrav <des_at_FreeBSD.org>
Date: Tue, 25 Aug 2026 10:48:16 UTC
Faraz Vahedi <kfv@FreeBSD.org> writes:
> Since these macros solely advertise which revision of the header our
> libc implements and are neither a language-mode nor visibility switch,
> I believe we’re fine.  C23-only identifiers are already gated on our
> visibility macros, and exposure of these feature test macros per se
> are not of any harm, even for libraries targeting modes prior to C23.
> For the same very reason, it is also fine to have these as include
> guards (which brand new C23 headers like <stdbit.h> and <stdckdint.h>
> still do).
>
> My restoration of traditional guards was just to avoid any possible
> POLA violation for those depending on them (albeit wrong) as reported
> by dim for math/gmp port as an example.

Just because you don't understand why they did it doesn't mean it's
wrong.  It just means you're young and inexperienced and have no
business making categorical statements like the above.  Please make the
__STDC_VERSION macros conditional on __ISO_C_VISIBLE >= 2023 ||
__BSD_VISIBLE.

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org