Re: [PATCH] cgroup: reorder flexible array members of struct cgroup_root

From: Nick Desaulniers
Date: Sat Oct 21 2017 - 15:08:51 EST


On Sat, Oct 21, 2017 at 9:03 AM, Tejun Heo <tj@xxxxxxxxxx> wrote:
> The kernel is explicitly using GNU extended version of C and has
> always from the beginning, so not-std-c isn't a valid argument.

Ok, how about that it looks like gcc7.1 starts treating this as an error?

https://godbolt.org/g/ivzPHZ

gcc6.3 looks like it starts trying to warn about this.

I don't have a local build of gcc7.1 to verify, but it seems like
setting -std=gnu99 doesn't help.

With Clang, it seems to be a warning that can be ignored via command
line flags, but doesn't look like that's possible for newer versions
of gcc, so this will have to be addressed at some point.