3 /* 7.2 Diagnostics <assert.h>
5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
9 #include <_PDCLIB_aux.h>
10 #include <_PDCLIB_config.h>
12 #ifndef _PDCLIB_ASSERT_H
13 #define _PDCLIB_ASSERT_H _PDCLIB_ASSERT_H
14 #if _PDCLIB_C_VERSION == 99
15 void _PDCLIB_assert( char const * const, char const * const, char const * const );
17 void _PDCLIB_assert( char const * const );
21 /* If NDEBUG is set, assert() is a null operation. */
25 #define assert( ignore ) ( (void) 0 )
27 #if _PDCLIB_C_VERSION == 99
28 #define assert( expression ) ( ( expression ) ? (void) 0 \
29 : _PDCLIB_assert( "Assertion failed: " #expression \
30 ", function ", __func__, \
32 ", line " _PDCLIB_symbol2string( __LINE__ ) \
35 #define assert( expression ) ( ( expression ) ? (void) 0 \
36 : _PDCLIB_assert( "Assertion failed: " #expression \
38 ", line " _PDCLIB_symbol2string( __LINE__ ) \