13 #ifdef NDEBUG /* required by ANSI standard */
14 # define assert(__e) ((void)0)
16 # define assert(__e) ((__e) ? (void)0 : __assert_func (__FILE__, __LINE__, \
19 # ifndef __ASSERT_FUNC
20 /* Use g++'s demangled names in C++. */
21 # if defined __cplusplus && defined __GNUC__
22 # define __ASSERT_FUNC __PRETTY_FUNCTION__
24 /* C99 requires the use of __func__. */
25 # elif __STDC_VERSION__ >= 199901L
26 # define __ASSERT_FUNC __func__
28 /* Older versions of gcc don't have __func__ but can use __FUNCTION__. */
30 # define __ASSERT_FUNC __FUNCTION__
32 /* failed to detect __func__ support. */
34 # define __ASSERT_FUNC ((char *) 0)
36 # endif /* !__ASSERT_FUNC */
39 void __assert (const char *, int, const char *)
40 _ATTRIBUTE ((__noreturn__
));
41 void __assert_func (const char *, int, const char *, const char *)
42 _ATTRIBUTE ((__noreturn__
));
44 #if __STDC_VERSION__ >= 201112L && !defined __cplusplus
45 # define static_assert _Static_assert