Skip to content

Commit

Permalink
Fix XXH_HAS_C_ATTRIBUTE check
Browse files Browse the repository at this point in the history
  • Loading branch information
easyaspi314 committed Dec 13, 2021
1 parent c0d7495 commit 4640547
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions xxhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -733,14 +733,12 @@ XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canoni
* 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

/*!
Expand Down

0 comments on commit 4640547

Please sign in to comment.