12#if defined (SING_NDEBUG) && ! defined (NOASSERT)
57#define __ASSERT(expression, message, file, line) \
58(fprintf( stderr, "error: " message "\n%s:%u: failed assertion `%s'\n", \
59 file, line, expression ), abort(), 0 )
60#define __ASSERT1(expression, message, parameter1, file, line) \
61(fprintf( stderr, "error: " message "\n%s:%u: failed assertion `%s'\n", \
62 parameter1, file, line, expression ), abort(), 0 )
64#define STICKYASSERT(expression, message) \
65((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__)))
66#define STICKYASSERT1(expression, message, parameter1) \
67((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__)))
69#define __WARN(expression, message, file, line) \
70(fprintf( stderr, "warning: " message "\n%s:%u: failed assertion `%s'\n", \
71 file, line, expression ), 0 )
72#define STICKYWARN(expression, message) \
73((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__)))
76#define __ASSERT(expression, message, file, line, function) \
77(fprintf( stderr, "error: " message "\n%s:%u: In function `%s':\nfailed assertion `%s'\n", \
78 file, line, function, expression ), abort(), 0 )
79#define __ASSERT1(expression, message, parameter1, file, line, function) \
80(fprintf( stderr, "error: " message "\n%s:%u: In function `%s':\nfailed assertion `%s'\n", \
81 parameter1, file, line, function, expression ), abort(), 0 )
83#define STICKYASSERT(expression, message) \
84((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__)))
85#define STICKYASSERT1(expression, message, parameter1) \
86((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__, __PRETTY_FUNCTION__)))
88#define __WARN(expression, message, file, line, function) \
89(fprintf( stderr, "warning: " message "\n%s:%u: In function `%s':\nfailed assertion `%s'\n", \
90 file, line, function, expression ), 0 )
91#define STICKYWARN(expression, message) \
92((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__)))
99#define ASSERT(expression, message) \
100((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__)))
101#define ASSERT1(expression, message, parameter1) \
102((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__)))
104#define WARN(expression, message) \
105((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__)))
108#define ASSERT(expression, message) \
109((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__)))
110#define ASSERT1(expression, message, parameter1) \
111((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__, __PRETTY_FUNCTION__)))
113#define WARN(expression, message) \
114((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__)))
117#define PVIRT_VOID(msg) \
118{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); }
119#define PVIRT_INTCF(msg) \
120{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }
121#define PVIRT_BOOL(msg) \
122{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return false; }
123#define PVIRT_INT(msg) \
124{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }
125#define PVIRT_CHARCC(msg) \
126{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }
128#define ASSERT(expression, message) do {} while (0)
129#define ASSERT1(expression, message, parameter1) do {} while (0)
131#define WARN(expression, message) do {} while (0)
133#define PVIRT_VOID(msg) = 0
134#define PVIRT_INTCF(msg) = 0
135#define PVIRT_BOOL(msg) = 0
136#define PVIRT_INT(msg) = 0
137#define PVIRT_CHARCC(msg) = 0