42#define _assert(e) assert(e)
44#if __STDC_VERSION__ >= 201112L && !defined __cplusplus
45#define static_assert _Static_assert
50# define assert(e) ((void)0)
51# define assert_msg(e, m) ((void)0)
57#if defined(__cplusplus)
58# define __ASSERT_FUNC __PRETTY_FUNCTION__
59#elif __STDC_VERSION__ >= 199901L
60# define __ASSERT_FUNC __func__
62# define __ASSERT_FUNC __FUNCTION__
64# define __ASSERT_FUNC ((char *)0)
79# define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e, NULL, __ASSERT_FUNC))
90# define assert_msg(e, m) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e, m, __ASSERT_FUNC))
95void __assert(
const char *file,
int line,
const char *expr,
96 const char *msg,
const char *func);
114 const char * msg,
const char * func);
Various common macros used throughout the codebase.
void(* assert_handler_t)(const char *file, int line, const char *expr, const char *msg, const char *func)
Assertion handler type.
Definition assert.h:113
assert_handler_t assert_set_handler(assert_handler_t hnd)
Set an assertion handler to call on a failed assertion.