When talking about inline I'm referring to "static inline" functions like
in
https://github.com/apache/incubator-nuttx/blob/c55085c0d8864c9401de97872ab3463d474f262c/include/nuttx/mutex.h
and not to "inline_function" define from compiler.h.
At least I do not find "#define inline" (to empty) in compiler.h

Best regards,
Petro

On Sat, Jan 8, 2022, 2:55 PM Gregory Nutt <spudan...@gmail.com> wrote:

> Inline is not an issue.  There is a file at include/nuttx/compiler.h that
> handles superficial differences between tools.  If the compiler does not
> support inline, it is simply undefined.
>
> I have built ez80 using the ZiLOG tools fairly recently, but none of the
> others.  It worked fine.
>
> On Fri, Jan 7, 2022 at 11:15 PM Petro Karashchenko <
> petro.karashche...@gmail.com> wrote:
>
> > Hi,
> >
> > What about inline functions? Those are also a part on C99.
> >
> > Are those old architectures checked by the CI? I mean do we have a proof
> > that those are still compilable with the latest release?
> >
> > Best regards,
> > Petro
> >
> > On Sat, Jan 8, 2022, 6:37 AM Xiang Xiao <xiaoxiang781...@gmail.com>
> wrote:
> >
> > >
> > >
> > > On Sat, Jan 8, 2022 at 6:29 AM 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.
> > >>
> > >>
> > > We need separate the features that come from the compiler and the
> > standard
> > > library. Since the libc is provided by NuttX self:
> > >
> > >    1. The header files(e.g.stdbool.h, intttyes.h) and function(e.g.
> > >    snprintf) can be used in common code since NuttX can provide the
> > >    implementation for all arch even the arch use a very old compiler
> > >    2. The preprocessor (e.g.  __VA_ARGS__) or language( designated
> > >    initializers) feature need to avoid or incorporate into the
> > conditional
> > >    macro
> > >
> > > .
> > >
> > >> 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.
> > >>
> > >
> > > As Greg said, if compilers used on all arch supported by NuttX support
> > > C99, there is no reason to limit us to C89. The compiler status is a
> > > keypoint.
> > >
> > >
> > >>
> > >> Best regards,
> > >> Petro
> > >>
> > >>
> >
>

Reply via email to