37 #define NORETURN __attribute__((noreturn))
52 #define PURE __attribute__((pure))
65 #define MAYBE_UNUSED __attribute__((unused))
79 #if defined(__llvm__) || defined(__clang__)
80 #define NO_SANITIZE_ARRAY __attribute__((no_sanitize("address")))
82 #define NO_SANITIZE_ARRAY
92 #if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ >= 5) || defined(__clang__)
93 #define UNREACHABLE() __builtin_unreachable()
95 #define UNREACHABLE() do { } while (1)
109 #define WITHOUT_PEDANTIC(...) \
110 _Pragma("GCC diagnostic push") \
111 _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
113 _Pragma("GCC diagnostic pop")
125 #define DECLARE_CONSTANT(identifier, const_expr) \
126 WITHOUT_PEDANTIC(enum { identifier = const_expr };)
141 #define IS_CT_CONSTANT(expr) <IMPLEMENTATION>
142 #elif defined(__GNUC__)
144 #define IS_CT_CONSTANT(expr) __builtin_constant_p(expr)
146 #define IS_CT_CONSTANT(expr) 0
156 #define likely(x) __builtin_expect((uintptr_t)(x), 1)
165 #define unlikely(x) __builtin_expect((uintptr_t)(x), 0)
178 #define assume(cond) ((cond) ? (void)0 : UNREACHABLE())
180 #define assume(cond) assert(cond)
POSIX.1-2008 compliant version of the assert macro.
static unsigned may_be_zero(unsigned n)
Wrapper function to silence "comparison is always false due to limited range of data type" t...