34# define NORETURN __attribute__((noreturn))
47# if ((__GNUC__ >= 15) || (__clang_major__ >= 21))
48# define NONSTRING __attribute__((nonstring))
63# define PURE __attribute__((pure))
76# define MAYBE_UNUSED __attribute__((unused))
90#if defined(__llvm__) || defined(__clang__)
91# define NO_SANITIZE_ARRAY __attribute__((no_sanitize("address")))
93# define NO_SANITIZE_ARRAY
103#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ >= 5) || defined(__clang__)
104# define UNREACHABLE() __builtin_unreachable()
106# define UNREACHABLE() do { } while (1)
126#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
139#define WITHOUT_PEDANTIC(...) \
140 _Pragma("GCC diagnostic push") \
141 _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
143 _Pragma("GCC diagnostic pop")
155#define DECLARE_CONSTANT(identifier, const_expr) \
156 WITHOUT_PEDANTIC(enum { identifier = const_expr };)
171# define IS_CT_CONSTANT(expr) <IMPLEMENTATION>
172#elif defined(__GNUC__)
174# define IS_CT_CONSTANT(expr) __builtin_constant_p(expr)
176# define IS_CT_CONSTANT(expr) 0
186#define likely(x) __builtin_expect((uintptr_t)(x), 1)
195#define unlikely(x) __builtin_expect((uintptr_t)(x), 0)
209#define assume(cond) ((cond) ? (void)0 : (assert(0), UNREACHABLE()))
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" ty...