Re: -Werror for `make W=0`

From: Linus Torvalds
Date: Wed Aug 19 2020 - 14:29:41 EST


On Wed, Aug 19, 2020 at 2:44 AM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> Maybe silly idea, but would it make sense to enable -Werror for default warning
> level, let's say W=0, at some point?

I'd love to, and would have done that a long time ago, but we just
haven't been able to depend on the compilers not having random
warnings in random versions.

And making it a config option doesn't work well either, simply because
that will just mean that bots will randomly fail if they set that
option, and if we make it harder to set developers won't have it set
anyway, and it doesn't help much.

End result: using -Werror works wonderfully in controlled
environments. Not so wonderfully in the general random mess.

That said, I've been so aggressive against accepting new warnings that
I've considered this unconditionally anyway, and then dealing with
compiler version fallout by just disabling certain compilers and/or
certain options.

But it would almost certainly be pretty painful.

Linus