]> pd.if.org Git - pdclib/commitdiff
The other code did not work, and ((void)0) is actually specified in the standard.
authorMartin Baute <solar@rootdirectory.de>
Mon, 7 Mar 2016 20:09:34 +0000 (21:09 +0100)
committerMartin Baute <solar@rootdirectory.de>
Mon, 7 Mar 2016 20:09:34 +0000 (21:09 +0100)
includes/assert.h

index e2618a0e964a32ec5e947acf4aafc2ccb5d2fcde..44b30b87b7bdbe98281ad086afed1162fb623a4c 100644 (file)
@@ -42,10 +42,7 @@ void _PDCLIB_assert89( char const * const );
 #undef assert
 
 #ifdef NDEBUG
-#define assert( ignore ) do { \
-        if(!(expression)) { _PDCLIB_UNREACHABLE; } \
-    } while(0)
-
+#define assert( ignore ) ( (void) 0 )
 #elif _PDCLIB_C_MIN(99)
 #define assert(expression) \
     do { if(!(expression)) { \