Re: [PATCH] kbuild: Enable -Wimplicit-fallthrough for clang 14.0.0+
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-08-17 04:38:19
Also in:
lkml
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-08-17 04:38:19
Also in:
lkml
On Mon, Aug 16, 2021 at 6:20 PM Nathan Chancellor [off-list ref] wrote:
Additionally, there should be some time for the CI systems to update their clang-14 builds, as the recent 0day report shows.
What?
No, the 0day report shows that the patch is buggy, and that the
ifeq ($(shell test $(CONFIG_CLANG_VERSION) -ge 140000; echo $$?),0)
clearly doesn't work at all, since the flag is enabled on those
systems with old clang versions.
Alternatively, the test works, but the 140000 version is not enough.
So no. This patch is simply completely wrong, and doesn't fix the
problem with Clang's buggy -Wimplicit-fallthrough flag.
Linus