The only issue is that there are several architectures that only have c89
compilers available for them.  Moving to C11 for the common code is
equivalent to saying that we will no longer support those architectures.
If we agree that we no longer need to support those architectures and that
it will not be an issue in the future, then there is no reason not to adopt
C11.

I forget all of the architectures that have no C11 compilers available.
This would apply to architectures that do not use GCC or mainstream tools
(like the ZiLOG 8- and 16-bit architectures) and also to old architectures
that use GCC but are not supported by the most recent versions of GCC.
like HCS12, AVR32, and others.

So discontinuing support for these architectures is really the crux of this
discussion.  This is a decision that should not be taken lightly and I
would recommend that we have a formal discussion with the community and a
vote by the PPMC before we discontinue support for any architectures.

All users matter.

On Fri, Jan 7, 2022 at 4:29 PM Petro Karashchenko <
petro.karashche...@gmail.com> wrote:

> Hello team,
>
> Recently I mr. @Xiang Xiao <xiaoxiang781...@gmail.com> had a discussion in
> one of the PR's related to C89 code compliance. Particularly related to
> initializing a structure by field names (designated initializers). Mr.
> @Xiang
> Xiao <xiaoxiang781...@gmail.com> pointed out that "for the common code it
> is better to avoid C99 only features".
> I examined the current NuttX code and see that currently common code is far
> away from C89 already and things like "<stdbool.h>", "<inttypes.h>",
> "snprintf", "designated initializers", "__VA_ARGS__" (variadic macro) are
> deeply embedded into the code.
>
> I would like to come up with the suggestion to make C99 as a prerequisite
> for the compiler that is used to build NuttX code.
>
> Best regards,
> Petro
>

Reply via email to