Article View: muc.lists.netbsd.tech.kern
Article #37Re: Do all -current compilers support C23 typed enum syntax?
From: Taylor R Campbell
Date: Thu, 03 Dec 2026 22:24
Date: Thu, 03 Dec 2026 22:24
29 lines
3045 bytes
3045 bytes
> Date: Thu, 3 Dec 2026 14:02:21 -0800
> From: Chris Hanson <cmhanson@eschatologist.net>
>
> > On Dec 3, 2026, at 4:20 AM, Greg Troxel <gdt@lexort.com> wrote:
> >
> > Would this mean that programs that either
> > use your API
> > include a header where this is defined
> >
> > could only be compiled with a compiler in --std=c23 mode?
>
> This is a good point. Apparently -current (both the userspace and
> kernel) are compiled in --std=c23 mode, but I didn't check whether
> that was explicitly passed or whether it was the compiler's default.
How did you conclude that?
68 CFLAGS+= ${${ACTIVE_CC} == "clang":? -std=gnu11 :}
69 CFLAGS+= ${${ACTIVE_CC} == "gcc":? -std=gnu11 :}
70 CFLAGS+= ${${ACTIVE_CC} == "pcc":? -std=gnu11 :}
https://nxr.NetBSD.org/xref/src/share/mk/bsd.sys.mk?r=1.319#68
$ $TOOLDIR/bin/x86_64--netbsd-gcc -dM -x c -E /dev/null | grep STDC_VERSION
#define __STDC_VERSION__ 201710L
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<20261203222439.AAD9484D19@mail.netbsd.org>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news.szaf.org!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<94AA8AC2-1142-4439-8701-1A03DF592A90@eschatologist.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news.szaf.org!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail From: Taylor R Campbell <riastradh@NetBSD.org> Newsgroups: muc.lists.netbsd.tech.kern Subject: Re: Do all -current compilers support C23 typed enum syntax? Date: Thu, 3 Dec 2026 22:24:39 +0000 Organization: Newsgate at muc.de e.V. Sender: tech-kern-owner@NetBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <20261203222439.AAD9484D19@mail.netbsd.org> References: <94AA8AC2-1142-4439-8701-1A03DF592A90@eschatologist.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="26788"; mail-complaints-to="news-admin@muc.de" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org; s=20240131; t=1796336682; bh=gidBkSMHJiQqKjyQAOHF5BI/wLTwgiqZzowPgvRuBj8=; h=To:CC:In-reply-to:Subject:Date:From:List-Id:List-Unsubscribe; b=zuEDYt0Mw+ZjzFG4n6LdC4l4wpr/wg+ub0J1CUZn5VuH3aYqTXvy2Nho6Yk4ynmhn 8LRmmomGuWdrD5d5Kx12LaNkQ5zuOC0A5ThcmHgsMvPI08S0L4p2QwjLleURKqtmel vEU4zeAKgtnd+/WAZFJkzMm5DYtkvka9A6lJ8cCo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org; s=20240131; t=1796336679; bh=gidBkSMHJiQqKjyQAOHF5BI/wLTwgiqZzowPgvRuBj8=; h=To:CC:In-reply-to:Subject:Date:From; b=L2OQ86tmLVUanV8g2XHr1WOEVm0C2D9RTbU5xXEuqb3v+5evYEAhytT67cI+viWO6 sO+GAhWX5JNXtrT0mKw6qP8xTgWFrPdKtGs/FVFEgC4rpnKaBL0MqJE/F9yWW5UGOb IoTAoMxbtbKNbNkevdvf+OiYv9jAPRQJ5AU3dffA= In-reply-to: <94AA8AC2-1142-4439-8701-1A03DF592A90@eschatologist.net> (cmhanson@eschatologist.net) Precedence: bulk X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes