3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-07 18:05:21 +00:00

use static_assert in COMPILE_TIME_ASSERT

This commit is contained in:
Nuno Lopes 2017-08-14 20:10:17 +01:00
parent 2473c69679
commit 632c2d8ebf

View file

@ -90,14 +90,7 @@ bool is_debug_enabled(const char * tag);
exit(-1); \
}
#define MAKE_NAME2(LINE) zofty_ ## LINE
#define MAKE_NAME(LINE) MAKE_NAME2(LINE)
#define DBG_UNIQUE_NAME MAKE_NAME(__LINE__)
#ifdef __GNUC__
#define COMPILE_TIME_ASSERT(expr) extern __attribute__((unused)) char DBG_UNIQUE_NAME[expr]
#else
#define COMPILE_TIME_ASSERT(expr) extern char DBG_UNIQUE_NAME[expr]
#endif
#define COMPILE_TIME_ASSERT(expr) static_assert(expr, "")
void finalize_debug();
/*