Re: [PATCH] m68k: tools: Replace zero-length array with flexible-array member

2020-05-25 Thread Gustavo A. R. Silva
On Mon, May 25, 2020 at 10:49:02AM +0200, Geert Uytterhoeven wrote: > > > > [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > [2] https://github.com/KSPP/linux/issues/21 > > [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") > > > > Signed-off-by: Gustavo A. R. Silva > > Rev

Re: [PATCH] m68k: tools: Replace zero-length array with flexible-array member

2020-05-25 Thread Geert Uytterhoeven
On Thu, May 21, 2020 at 8:52 PM Gustavo A. R. Silva wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: >

[PATCH] m68k: tools: Replace zero-length array with flexible-array member

2020-05-21 Thread Gustavo A. R. Silva
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By ma