2022-03-26 20:19:34

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 01/22] orion5x: Replace comments with C99 initializers

On Sat, Mar 26, 2022 at 5:58 PM Benjamin Stürz <[email protected]> wrote:
>
> This replaces comments with C99's designated
> initializers because the kernel supports them now.

The change looks fine, but the comment looks misplaced, as enum initializers
are not c99 feature. Also, the named array and struct intializers have been
supported by gnu89 for a long time and widely used in the kernel, so it's
not a recent change even for the others.

Also,

Arnd


2022-03-28 20:29:52

by Segher Boessenkool

[permalink] [raw]
Subject: Re: [PATCH 01/22] orion5x: Replace comments with C99 initializers

On Sat, Mar 26, 2022 at 08:23:31PM +0100, Arnd Bergmann wrote:
> On Sat, Mar 26, 2022 at 5:58 PM Benjamin St?rz <[email protected]> wrote:
> >
> > This replaces comments with C99's designated
> > initializers because the kernel supports them now.
>
> The change looks fine, but the comment looks misplaced, as enum initializers
> are not c99 feature.

Yes, it is from C89/C90.

> Also, the named array and struct intializers have been
> supported by gnu89 for a long time and widely used in the kernel, so it's
> not a recent change even for the others.

GCC supports this since 1998. There was a syntax different from C99
designated initializers (".ans = 42") before (namely, "ans: 42").

1998 is long enough ago for all intents and purposes now of course ;-)


Segher