Alexei Podtelezhnikov wrote: > > > Wiki suggests __apple_build_version__ >= 12000000 > > > https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2 > ... > I wish I could directly test it. However, I could confirm that Swift > release 5.3 (Xcode 12) was the first release with this line > https://github.com/apple/llvm-project/blob/swift-5.3-RELEASE/clang/test/Sema/fallthrough-attr.c#L18
Thanks for the investigation. Although we can't test it, these are two independent hints that __apple_build_version__ >= 12000000 is OK. Applied: 2023-02-28 Bruno Haible <br...@clisp.org> dfa: Tweak the last patch. Suggested by Alexei Podtelezhnikov <apodt...@gmail.com>. * lib/dfa.c (FALLTHROUGH): Assume that Apple clang, in C mode, supports __attribute__ ((__fallthrough__)) starting with version 1200. 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 diff --git a/lib/dfa.c b/lib/dfa.c index 994900fea2..20502a802f 100644 --- a/lib/dfa.c +++ b/lib/dfa.c @@ -69,7 +69,7 @@ c_isdigit (char c) # define FALLTHROUGH [[__fallthrough__]] # elif ((__GNUC__ >= 7) \ || (defined __apple_build_version__ \ - ? __apple_build_version__ >= 14000000 \ + ? __apple_build_version__ >= 12000000 \ : __clang_major__ >= 10)) # define FALLTHROUGH __attribute__ ((__fallthrough__)) # else