diff options
author | Bruno Haible <bruno@clisp.org> | 2023-02-26 16:56:19 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-02-26 16:56:19 +0100 |
commit | c7d7c31ced7575de8078a7c1389049dbe02a8f50 (patch) | |
tree | 114d6cda93060a513f5777dc1519ae393fb12e79 /lib | |
parent | f4108bb802770feed541f4b168aebbea45146ede (diff) | |
download | gnulib-c7d7c31ced7575de8078a7c1389049dbe02a8f50.tar.gz |
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__.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dfa.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -67,7 +67,10 @@ c_isdigit (char c) #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__ >= 14000000 \ + : __clang_major__ >= 10)) # define FALLTHROUGH __attribute__ ((__fallthrough__)) # else # define FALLTHROUGH ((void) 0) |