]> Savannah Git Hosting - gnulib.git/commitdiff
dfa: Tweak the last patch.
authorBruno Haible <bruno@clisp.org>
Tue, 28 Feb 2023 04:59:25 +0000 (05:59 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 28 Feb 2023 05:00:02 +0000 (06:00 +0100)
Suggested by Alexei Podtelezhnikov <apodtele@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

ChangeLog
lib/dfa.c

index 25610ee51b06f37370c42a0538d9fb3670589f4f..3ea0e896adeb0c29bfc7e7e07861265b09b58dcb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2023-02-28  Bruno Haible  <bruno@clisp.org>
+
+       dfa: Tweak the last patch.
+       Suggested by Alexei Podtelezhnikov <apodtele@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
+
 2023-02-27  ChuanGang Jiang  <jiangchuanganghw@outlook.com>
 
        fts: fail gracefully when out of memory
index 994900fea2fe73230f538f9055f34129d403e37e..20502a802facba5e87cd93078618e8ac395d562c 100644 (file)
--- 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