Reported by Werner Lemberg <wl@gnu.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00159.html>.
* lib/dfa.c (FALLTHROUGH): When __apple_build_version__ is defined,
ignore __clang_major__.
References:
https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2
https://github.com/apple/llvm-project/blob/swift-5.3-RELEASE/clang/test/Sema/fallthrough-attr.c
+2023-02-26 Bruno Haible <bruno@clisp.org>
+
+ dfa: Avoid warnings with some Apple clang versions.
+ Reported by Werner Lemberg <wl@gnu.org> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00159.html>.
+ * lib/dfa.c (FALLTHROUGH): When __apple_build_version__ is defined,
+ ignore __clang_major__.
+ References:
+ https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2
+ https://github.com/apple/llvm-project/blob/swift-5.3-RELEASE/clang/test/Sema/fallthrough-attr.c
+
2023-02-23 Paul Eggert <eggert@cs.ucla.edu>
lseek: avoid SEEK_HOLE bugs in FreeBSD, macOS
#ifndef FALLTHROUGH
# if 201710L < __STDC_VERSION__
# define FALLTHROUGH [[__fallthrough__]]
-# elif (__GNUC__ >= 7) || (__clang_major__ >= 10)
+# elif ((__GNUC__ >= 7) \
+ || (defined __apple_build_version__ \
+ ? __apple_build_version__ >= 12000000 \
+ : __clang_major__ >= 10))
# define FALLTHROUGH __attribute__ ((__fallthrough__))
# else
# define FALLTHROUGH ((void) 0)