4 // tries to be the same as assert(), but always present even with NDEBUG
7 extern void __assert(const char *__expr, const char *__file, const int __line);
10 #define rassert(expr) \
11 ((void) ((expr) || (__assert ("", __FILE__, __LINE__), 0)))
13 #define rassert(expr) \
14 ((void) ((expr) || (__assert (__STRING(expr), __FILE__, __LINE__), 0)))
16 #elif defined(__GLIBC__)
17 extern void __assert_fail (const char *__assertion, const char *__file,
18 unsigned int __line, const char *__function)
19 __THROW __attribute__ ((__noreturn__));
21 # define rassert(expr) \
24 : __assert_fail (#expr, __FILE__, __LINE__, __extension__ __PRETTY_FUNCTION__))
26 // for unsupported platforms, it won't work with NDEBUG
29 #define rassert(expr) assert(expr)