Re: [PATCH v2] bpf: use flexible array members, not zero-length

2019-09-30 Thread Gustavo A. R. Silva
On 9/30/19 02:38, Stephen Kitt wrote: > This switches zero-length arrays in variable-length structs to C99 > flexible array members. GCC will then ensure that the arrays are > always the last element in the struct. > > Coccinelle: > @@ > identifier S, fld; > type T; > @@ > > struct S { > ...

Re: [PATCH] bpf: use flexible array members, not zero-length

2019-09-28 Thread Gustavo A. R. Silva
On 9/28/19 09:48, Stephen Kitt wrote: > This switches zero-length arrays in variable-length structs to C99 > flexible array members. GCC will then ensure that the arrays are > always the last element in the struct. > > Coccinelle: > @@ > identifier S, fld; > type T; > @@ > > struct S { > ...