Message ID | 20211113214125.GA23640@embeddedor (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Gustavo A. R. Silva |
Headers | show |
Series | [GIT,PULL] Enable -Wimplicit-fallthrough for Clang for 5.16-rc1 | expand |
On Sat, Nov 13, 2021 at 1:36 PM Gustavo A. R. Silva <gustavoars@kernel.org> wrote: > > This patch has been baking in linux-next for a couple of developement > cycles, now. So, I think we are pretty much ready to merge it into > mainline. Ugh. It's also very ugly. Wouldn't something like this (TOTALLY UNTESTED!) work and do the right thing? This seems like a natural for a Kconfig decision. Also, does -Wimplicit-fallthrough=5 work with clang too? That would simplify things a bit, and then we could just use a regular boolean and do KBUILD_CFLAGS-$(CC_IMPLICIT_FALLTHROUGH) += -Wimplicit-fallthrough=5 in the Makefile, which is more in like with what we do for other config-time cflags.. Linus
On Sat, Nov 13, 2021 at 03:20:19PM -0800, Linus Torvalds wrote: > On Sat, Nov 13, 2021 at 1:36 PM Gustavo A. R. Silva > <gustavoars@kernel.org> wrote: [..] > Wouldn't something like this (TOTALLY UNTESTED!) work and do the right thing? > > This seems like a natural for a Kconfig decision. > > Also, does -Wimplicit-fallthrough=5 work with clang too? That would > simplify things a bit, and then we could just use a regular boolean > and do > > KBUILD_CFLAGS-$(CC_IMPLICIT_FALLTHROUGH) += -Wimplicit-fallthrough=5 It doesn't work: error: unknown warning option '-Wimplicit-fallthrough=5'; did you mean '-Wimplicit-fallthrough'? [-Werror,-Wunknown-warning-option] However, your patch does work. :) I'll send it as a proper patch, shortly. Thanks -- Gustavo