Re: _ISOCxx_SOURCE

Alejandro Colomar <[email protected]> Mon, 15 Jun 2026 23:06:44 +0200
Newsgroups org.kernel.vger.linux-man
Message-ID <ajBpIbEH_7KkJrld@devuan>
Hi Joseph,

On 2026-06-15T17:20:17+0000, Joseph Myers wrote:
> On Sat, 13 Jun 2026, Alejandro Colomar via Gcc wrote:
> 
> > I was reviewing the feature_test_macros(7) page, and found the
> > documentation of the _ISOC{99,11,23,...}_SOURCE macros to be incorrect.
> > And thinking about fixing that led me to think that the design of those
> > macros is less than ideal.
> 
> Users should normally use -std= options with the compiler to get matching 
> language and library features.  These feature test macros are mainly for 
> niche cases with old compilers.  So I don't think any new user-facing 
> design for them should be added (the C23 and later ones already use the 
> newer __GLIBC_USE style of conditionals in the header implementation).

Makes sense.  Should I document that users should avoid setting them
directly (and that they should use the corresponding compiler flag)?


Have a lovely night!
Alex

-- 
<https://www.alejandro-colomar.es>
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmowaV0ACgkQ64mZXMKQ
wqn1Hw/+Ia9QB5ReK1aGVi8AZD10RqVsik9G5M2RX/lX/rsBh2I2O+qPjTT9MAKA
uJESJeWKGS1+CLZIRCuWUgmwf/IfFsaAJxDvB8u8A3yPcn1ra1GcZyu+f2NHu3S9
rGZOdwc+h6/uRgK2KsVl52AtKISbD7uAxOIdx5ECLQAkBFGaGsSdQj/CbrEOfYjm
9Y5NsOCmCKyjFy4PZKXyQvsVC42LL8GzW3MI5NvpQhQUXzDdrHmmRtAHhCOiU7oS
FaALVFlY3Iki3FrIclbHepN4VmslbLh0kW2tKYDIM/bcwrjGzF23V+HM7cGln2v5
I/4nBgMysG1qsIvcSDsgNqJ72tz/X2UEJZSdBjhyhBN37mn/36yi+KVI54eLH8RY
mH8vQQNhtX0jEkGwv/r9xnAGmzgdBar7sX4nFIZduH9riWQypOBb0fTVsa8jb8RV
Y+nIChuDKxzLwjYsOS/IJJD3GU2SjTqU3eexXPGNL8qhYzpHTZv2VT9nD+/YUi0/
KdZGwCaGIgo1/qU1hkXTl8O57r0fQJyzPvtZBrXX2b9dOIx1clzRDcqMgM5+M8aR
OWs8AWS8uxkIPM3vWrjKdbg9Eu3/uDu9QnGgZKF9PqNlTpX+ONIGIaIMvU09skFA
PkQrhag0ndSnSNi0yjTGFhvJNoyvjN7cYDhHWRiekxSblmbAUTs=
=ERG9
-----END PGP SIGNATURE-----