Re: [PATCH] [RFC, EXPERIMENTAL] allow building with --std=gnu99

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 17, 2019 at 6:02 AM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> Change enough of the kernel to allow building a 'defconfig'
> kernel on x86 and arm, by turning the compound literals into
> struct initializers.

Ugh. I detest this patch.

Not only is the patch itself fairly ugly, the end result is
unmaintainable, since any regular kernel developer will

 (a) not use ancient compilers

 (b) look at code like this

   static struct rb_root memtype_rbroot = __RB_ROOT;

and go "that double underscore is pointless" and fix it. And it will
build fine for the developer.

So some of the patch looks like fine cleanups and not bad at all, but
some of it really looks like it's going to be long-term annoyance,
with duplicate names and unnecessary underscores.

In general the double underscores in contexts where they don't exist
from before just look wrong.

Some of the "just remove the cast from the macro define" look good,
though. And making users do DEFINE_RB_ROOT() looks fine. It's more the
"make users have to use the internal double-underscore versions" where
I go "that's wrong".

What distros are still stuck on gcc-4?

              Linus



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux