Re: git: 28cecfe27964 - main - libc: Restrict ATOMIC_VAR_INIT for C23 conformance

From: Dag-Erling_Smørgrav <des_at_FreeBSD.org>
Date: Mon, 22 Jun 2026 10:49:58 UTC
Faraz Vahedi <kfv@kfv.io> writes:
> That distinction is well understood, but I think removals tied to a
> specific standard version are cases worth considering separately.
>
> In this case for example, ATOMIC_VAR_INIT is only removed from C23, so
> the relevant question is not which interfaces we choose to expose, but
> rather whether the compiler is operating in C23 mode.

No.  Using __STDC_VERSION__ here would mean “this library feature only
works when compiled by a certain compiler” which is not the case.

> Assume the default standard mode of a compiler is C17, internal
> visibility policy is set to C23, this is absolutely expected to have,
> say ATOMIC_VAR_INIT (that has been deprecated since C17 but remained
> available until removed in C23,) if not explicitly compiled for
> C23.

That's the fault of whomever decided to request that specific
combination of C compiler and library version.

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