Commit 7770298a authored by Max Kellermann's avatar Max Kellermann

util/Compiler.h: use `[[fallthrough]]` on clang

Older clang versions don't support the GCC __attribute__ syntax. For those, don't use anything at all, and new clang versions shall use the standard syntax.
parent fa50cdb3
...@@ -143,8 +143,10 @@ ...@@ -143,8 +143,10 @@
#define gcc_flatten #define gcc_flatten
#endif #endif
#if CLANG_OR_GCC_VERSION(7,0) #if GCC_CHECK_VERSION(7,0)
#define gcc_fallthrough __attribute__((fallthrough)) #define gcc_fallthrough __attribute__((fallthrough))
#elif CLANG_CHECK_VERSION(10,0)
#define gcc_fallthrough [[fallthrough]]
#else #else
#define gcc_fallthrough #define gcc_fallthrough
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment