Re: [PATCH] IB/mlx4: Replace zero-length array with flexible-array

2020-05-13 Thread Jakub Kicinski
On Wed, 13 May 2020 15:43:16 -0300 Jason Gunthorpe wrote: > On Sat, May 09, 2020 at 08:51:50PM -0700, Jakub Kicinski wrote: > > On Thu, 7 May 2020 13:59:21 -0500 Gustavo A. R. Silva wrote: > > > The current codebase makes use of the zero-length array language > > > extension to the C90 standard,

Re: [PATCH] IB/mlx4: Replace zero-length array with flexible-array

2020-05-13 Thread Jason Gunthorpe
On Sat, May 09, 2020 at 08:51:50PM -0700, Jakub Kicinski wrote: > On Thu, 7 May 2020 13:59:21 -0500 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

Re: [PATCH] IB/mlx4: Replace zero-length array with flexible-array

2020-05-13 Thread Leon Romanovsky
On Wed, May 13, 2020 at 03:33:35PM -0300, Jason Gunthorpe wrote: > On Thu, May 07, 2020 at 01:59:21PM -0500, 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

Re: [PATCH] IB/mlx4: Replace zero-length array with flexible-array

2020-05-13 Thread Jason Gunthorpe
On Thu, May 07, 2020 at 01:59:21PM -0500, 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

Re: [PATCH] IB/mlx4: Replace zero-length array with flexible-array

2020-05-09 Thread Jakub Kicinski
On Thu, 7 May 2020 13:59:21 -0500 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] IB/mlx4: Replace zero-length array with flexible-array

2020-05-07 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