tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Do all -current compilers support C23 typed enum syntax?
> Date: Thu, 3 Dec 2026 14:02:21 -0800
> From: Chris Hanson <cmhanson%eschatologist.net@localhost>
>
> > On Dec 3, 2026, at 4:20 AM, Greg Troxel <gdt%lexort.com@localhost> 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
Home |
Main Index |
Thread Index |
Old Index