X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Fassert.h;h=ab745db18022aeda15f1d04ba6d4ef93c82b4f9d;hp=30a43d68fae741b6a8b05cd4451da70f984e4fba;hb=f44076181d25dd2401d182c111330b4290a9535c;hpb=0c05bd3a9c165cf2f0b9d6fa23a1f96532ddcdb3 diff --git a/include/assert.h b/include/assert.h index 30a43d68..ab745db1 100644 --- a/include/assert.h +++ b/include/assert.h @@ -1,23 +1,18 @@ -#undef assert +#include -#if __STDC_VERSION__ >= 201112L -#elif defined(__GNUC__) -#define _Noreturn __attribute__((__noreturn__)) -#else -#define _Noreturn -#endif +#undef assert #ifdef NDEBUG #define assert(x) (void)0 #else -#define assert(x) ((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)) +#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0))) #endif #ifdef __cplusplus extern "C" { #endif -_Noreturn void __assert_fail (const char *, const char *, int, const char *); +void __assert_fail (const char *, const char *, int, const char *); #ifdef __cplusplus }