From: Alejandro Colomar <alx@kernel.org>
To: Joseph Myers <josmyers@redhat.com>
Cc: libc-alpha@sourceware.org, gcc@gcc.gnu.org, linux-man@vger.kernel.org
Subject: Re: _ISOCxx_SOURCE
Date: Wed, 17 Jun 2026 00:09:37 +0200 [thread overview]
Message-ID: <ajHIbvWy9iCilUCX@devuan> (raw)
In-Reply-To: <a514153e-7842-0cfa-92c9-a4137c58b153@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 961 bytes --]
Hi Joseph,
On 2026-06-16T21:52:57+0000, Joseph Myers wrote:
> On Tue, 16 Jun 2026, Alejandro Colomar via Gcc wrote:
>
> > If one uses a modern GCC with an old glibc (which doesn't know C23),
> > then, using -std=c23 will be problematic: the compiler will enable C23
> > language mode, but the library will entirely and silently ignore
> > _ISOC23_SOURCE, because it doesn't know about it, thus falling back to
> > C89 mode (I guess), and thus will for example enable things like
> > gets(3).
>
> Since the relevant checks in features.h are based on __STDC_VERSION__ >
> something or __STDC_VERSION__ >= something,
Ahh, yup, it has || for either _ISOCxx_SOURCE or __STDC_VERSION__. That
makes sense.
> it will fall back to the most
> recent C standard version known by that glibc version, which is probably
> what you want.
Hmmm, it is. Then it's all fine. Thanks!
Cheers,
Alex
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2026-06-16 22:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-13 12:02 _ISOCxx_SOURCE Alejandro Colomar
2026-06-15 17:20 ` _ISOCxx_SOURCE Joseph Myers
2026-06-15 21:06 ` _ISOCxx_SOURCE Alejandro Colomar
2026-06-16 16:02 ` _ISOCxx_SOURCE Joseph Myers
2026-06-16 21:11 ` _ISOCxx_SOURCE Alejandro Colomar
2026-06-16 21:52 ` _ISOCxx_SOURCE Joseph Myers
2026-06-16 22:09 ` Alejandro Colomar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ajHIbvWy9iCilUCX@devuan \
--to=alx@kernel.org \
--cc=gcc@gcc.gnu.org \
--cc=josmyers@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-man@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.