46 #define DEBUG_ASSERT_VERBOSE 49 #ifndef RIOT_FILE_RELATIVE 50 #define RIOT_FILE_RELATIVE (__FILE__) 59 #define assert(ignore)((void) 0) 60 #elif defined(DEBUG_ASSERT_VERBOSE) 104 #define assert(cond) ((cond) ? (void)0 : _assert_failure(RIOT_FILE_RELATIVE, __LINE__)) 106 #define assert(cond) ((cond) ? (void)0 : core_panic(PANIC_ASSERT_FAIL, assert_crash_message)) 109 #if !defined __cplusplus 110 #if __STDC_VERSION__ >= 201112L 114 #define static_assert(...) _Static_assert(__VA_ARGS__) 121 #define static_assert(cond, ...) \ 122 { enum { static_assert_failed_on_div_by_0 = 1 / (!!(cond)) }; } NORETURN void _assert_failure(const char *file, unsigned line)
Function to handle failed assertion.
const char assert_crash_message[]
the string that is passed to panic in case of a failing assertion
#define NORETURN
The NORETURN keyword tells the compiler to assume that the function cannot return.