mirror of https://git.tukaani.org/xz.git
sysdefs.h: Add FALLTHROUGH macro
This commit is contained in:
parent
e34dbd6a0a
commit
f31c3a6647
|
@ -203,4 +203,13 @@ typedef unsigned char _Bool;
|
||||||
# define lzma_attr_alloc_size(x)
|
# define lzma_attr_alloc_size(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __STDC_VERSION__ >= 202311
|
||||||
|
# define FALLTHROUGH [[__fallthrough__]]
|
||||||
|
#elif (defined(__GNUC__) && __GNUC__ >= 7) \
|
||||||
|
|| (defined(__clang_major__) && __clang_major__ >= 10)
|
||||||
|
# define FALLTHROUGH __attribute__((__fallthrough__))
|
||||||
|
#else
|
||||||
|
# define FALLTHROUGH ((void)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue