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.
10 #define _PDCLIB_AUX_H _PDCLIB_AUX_H
11 #include <_PDCLIB_aux.h>
14 #ifndef _PDCLIB_CONFIG_H
15 #define _PDCLIB_CONFIG_H _PDCLIB_CONFIG_H
16 #include <_PDCLIB_config.h>
19 #ifndef _PDCLIB_ASSERT_H
20 #define _PDCLIB_ASSERT_H _PDCLIB_ASSERT_H
21 #if _PDCLIB_C_VERSION == 99
22 void _PDCLIB_assert( char const * const, char const * const, char const * const );
24 void _PDCLIB_assert( char const * const );
28 /* If NDEBUG is set, assert() is a null operation. */
32 #define assert( ignore ) ( (void) 0 )
34 #if _PDCLIB_C_VERSION == 99
35 #define assert( expression ) ( ( expression ) ? (void) 0 \
36 : _PDCLIB_assert( "Assertion failed: " #expression \
37 ", function ", __func__, \
39 ", line " _PDCLIB_symbol2string( __LINE__ ) \
42 #define assert( expression ) ( ( expression ) ? (void) 0 \
43 : _PDCLIB_assert( "Assertion failed: " #expression \
45 ", line " _PDCLIB_symbol2string( __LINE__ ) \