From 0d205e5cf327e4b5d6946ca4a09ae65d2c4c194e Mon Sep 17 00:00:00 2001 From: "easyaspi314 (Devin)" Date: Mon, 13 Dec 2021 15:08:50 -0500 Subject: [PATCH] Fix XXH_HAS_C_ATTRIBUTE check --- include/xxhash.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/xxhash.h b/include/xxhash.h index fbd1aab9a..c17521f99 100644 --- a/include/xxhash.h +++ b/include/xxhash.h @@ -631,14 +631,12 @@ introduced in CPP17 and C23. CPP17 : https://en.cppreference.com/w/cpp/language/attributes/fallthrough C23 : https://en.cppreference.com/w/c/language/attributes/fallthrough */ -#if XXH_HAS_C_ATTRIBUTE(x) -# define XXH_FALLTHROUGH [[fallthrough]] -#elif XXH_HAS_CPP_ATTRIBUTE(x) +#if XXH_HAS_C_ATTRIBUTE(fallthrough) || XXH_HAS_CPP_ATTRIBUTE(fallthrough) # define XXH_FALLTHROUGH [[fallthrough]] #elif XXH_HAS_ATTRIBUTE(__fallthrough__) -# define XXH_FALLTHROUGH __attribute__ ((fallthrough)) +# define XXH_FALLTHROUGH __attribute__ ((__fallthrough__)) #else -# define XXH_FALLTHROUGH +# define XXH_FALLTHROUGH /* fallthrough */ #endif /*! -- 2.47.3