Re: Build error in crypto/marvell/cesa/cipher.c

From: Linus Torvalds
Date: Thu Jun 29 2023 - 00:36:17 EST


On Wed, 28 Jun 2023 at 20:48, Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>
> The unexpected bit is that without -fstrict-flex-arrays=3 (i.e. the
> default since the dawn of time), the compiler treats any array that
> happens to be the last struct member as a flexible array.

Oh. Ok, that explains why it's showing up for me now, at least. It's
an odd rule, but I can see why people would have done that.

I've only seen the zero- and one-sized arrays commonly used for the
traditional "fake flex array", but I guess other sizes can easily
happen.

Linus