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?



Chris Hanson <cmhanson%eschatologist.net@localhost> writes:

> It sounds like this is the approach I should take in what I’m hacking
> on in order to enable compilation in older language modes.

I think what's appropriate is for you to propose specific changes to the
existing rules to core@ and then follow what core@ decides.

/usr/share/misc/style doesn't specifically allow or prohibit writing in
any particular C sublanguage.  That's either a bug, or just that it's in
/usr/share/mk/bsd.sys.mk.

bsd.sys.mk says:

  # NetBSD sources use C99 style, with some GCC extensions.
  # Coverity does not like -std=gnu99 (XXX untested but likely not gnu11 either)
  #
  # XXX Ideally we would not rely on GNU extensions, but currently some
  # code uses alloca(3) which -std=c11 compiles broken-at-runtime.  Until
  # we fix that (PR toolchain/58969: use of alloca is warning, not error,
  # with -std=c11), we have to continue using -std=gnu11 and not
  # -std=c11.

That should probably be checked and clarified, as there's no explanation
of why after saying C99 it's gnu11/c11 being discussed.  Overall I read
it as "sources should be C99, and it's a bug to need C11 or gnu
extensions, but that's where we are", but I'm not at all sure I'm
getting it right.



I'm not saying I'm entirely opposed to what you want to do -- just that
it's a big deal to use new language standards, and that changing our
norms on that is for core@ to decide.


Home | Main Index | Thread Index | Old Index