X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=includes%2Fassert.h;h=44b30b87b7bdbe98281ad086afed1162fb623a4c;hp=349c866f05ccde2664460bd164311d12d5f5d5eb;hb=0b6ba474c9a13ef218554539106c0a52776ac189;hpb=e1c526e9bad3f6e69391e94059096145390508d3 diff --git a/includes/assert.h b/includes/assert.h index 349c866..44b30b8 100644 --- a/includes/assert.h +++ b/includes/assert.h @@ -30,16 +30,19 @@ _PDCLIB_BEGIN_EXTERN_C void _PDCLIB_assert99( char const * const, char const * const, char const * const ); void _PDCLIB_assert89( char const * const ); +#if _PDCLIB_C_VERSION >= 2011 +#define static_assert _Static_assert +#else +#define static_assert( e, m ) +#endif + #endif /* If NDEBUG is set, assert() is a null operation. */ #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)) { \