[Intel-gfx] [PATCH] Kbuild: remove -std=gnu89 from compiler arguments

Arnd Bergmann arnd at kernel.org
Mon Feb 28 08:11:37 UTC 2022


On Mon, Feb 28, 2022 at 1:14 AM John Stoffel <john at quad.stoffel.home> wrote:
>
> On Sun, Feb 27, 2022 at 10:52:43PM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd at arndb.de>
> >
> > During a patch discussion, Linus brought up the option of changing
> > the C standard version from gnu89 to gnu99, which allows using variable
> > declaration inside of a for() loop. While the C99, C11 and later standards
> > introduce many other features, most of these are already available in
> > gnu89 as GNU extensions as well.
> >
> > An earlier attempt to do this when gcc-5 started defaulting to
> > -std=gnu11 failed because at the time that caused warnings about
> > designated initializers with older compilers. Now that gcc-5.1 is the
> > minimum compiler version used for building kernels, that is no longer a
> > concern. Similarly, the behavior of 'inline' functions changes between
> > gnu89 and gnu89, but this was taken care of by defining 'inline' to
>
> Typo here?  Second one should be gnu99 right?


Fixed, thanks!

        Arnd


More information about the Intel-gfx mailing list