Date: Sun, 14 Feb 2021 21:24:56 +0000 (UTC)
The problem appears to be between clang 11 and 12. In v11, the
attribute isn't recognized, and in v12 it is.
Changing the conditional to __clang_major__ >= 12 fixes the problem
on macos.
Taylor, why did you choose 10 instead?
I verified that __attribute__((__fallthrough__)) works with clang
10.0.1 -- example program attached (fails with -Wimplicit-fallthrough
-Werror, works if I uncomment the line).
Not supporting the attribute seem to be a quirk of Apple's version of
clang, from what I can tell. What _does_ work in Apple's toolchain to
selectively suppress -Wimplicit-fallthrough warnings?
$ clang --version
clang version 10.0.1
Target: x86_64-unknown-netbsd9.0
Thread model: posix
InstalledDir: /pkg/2020Q3/bin