Re: [PATCH] treewide: Replace zero-length arrays with flexible-array member
From: Kars de Jong
Date: Wed Feb 12 2020 - 03:36:27 EST
Op wo 12 feb. 2020 om 09:00 schreef Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>:
>
> Hi Gustavo,
>
> On Tue, Feb 11, 2020 at 10:49 PM Gustavo A. R. Silva
> <gustavo@xxxxxxxxxxxxxx> wrote:
> > --- a/arch/m68k/tools/amiga/dmesg.c
> > +++ b/arch/m68k/tools/amiga/dmesg.c
> > @@ -34,7 +34,7 @@ struct savekmsg {
> > u_long magic2; /* SAVEKMSG_MAGIC2 */
> > u_long magicptr; /* address of magic1 */
> > u_long size;
> > - char data[0];
> > + char data[];
> > };
>
> JFTR, this file is not really part of the kernel, but supposed to be compiled
> by an AmigaOS compiler, which may predate the introduction of support
> for flexible array members.
FYI, there's a reasonably modern toolchain for AmigaOS which can
compile this just fine (https://github.com/bebbo/amiga-gcc).
> Well, even if you keep it included, I guess the rare users can manage ;-)
> My binary dates back to 1996, and I have no plans to recompile it.
I did, just to check whether it still worked.
Kind regards,
Kars.