Clang differs slightly than GCC for the pattern:
switch (x) {
case 0:
++x;
default:
break;
}
Clang will warn, GCC will not. This is making it excessively painful to
enable -Wimplicit-fallthrough for Linux kernel builds with Clang, see
below link in which 140 patches were sent to try to fix up these
differences in kernel code. Kernel and GCC developers point out that
Clang should not warn in this case.
Link: https://github.com/ClangBuiltLinux/linux/issues/636
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432
Link: https://lore.kernel.org/lkml/CANiq72=E_gEVvqUUTSqU4zegC2=yZSTM4b=4G-iofp6d3=UgWQ@mail.gmail.com/T/#t
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>