From: Bruno Haible Date: Tue, 28 Feb 2023 04:59:25 +0000 (+0100) Subject: dfa: Tweak the last patch. X-Git-Tag: v1.0~1660 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=5513c3fcbbe26ca5f7c4e7789df25e31bbacbbee;p=gnulib.git dfa: Tweak the last patch. Suggested by Alexei Podtelezhnikov . * 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/ChangeLog b/ChangeLog index 25610ee51b..3ea0e896ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2023-02-28 Bruno Haible + + dfa: Tweak the last patch. + Suggested by Alexei Podtelezhnikov . + * 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 + 2023-02-27 ChuanGang Jiang fts: fail gracefully when out of memory 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