3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 10:55:50 +00:00

use Z3_fallthrough instead of __falthrough directly to avoid messing with reserved identifiers

Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
This commit is contained in:
Nuno Lopes 2015-10-09 18:06:49 +01:00
parent a951ff0769
commit 0e387b2abe
7 changed files with 28 additions and 24 deletions

View file

@ -68,6 +68,18 @@ COMPILE_TIME_ASSERT(sizeof(int64) == 8);
#define THREAD_LOCAL
#endif
#ifdef __fallthrough
# define Z3_fallthrough __fallthrough
#elif defined(__has_cpp_attribute)
# if __has_cpp_attribute(clang::fallthrough)
# define Z3_fallthrough [[clang::fallthrough]]
# else
# define Z3_fallthrough
# endif
#else
# define Z3_fallthrough
#endif
inline bool is_power_of_two(unsigned v) { return !(v & (v - 1)) && v; }
/**
@ -273,10 +285,6 @@ bool has_duplicates(const IT & begin, const IT & end) {
return false;
}
#ifndef __fallthrough
#define __fallthrough
#endif
#ifndef _WINDOWS
#ifndef __declspec
#define __declspec(X)