LibC: define static_assert in assert.h

This is needed from C11 until C23
This commit is contained in:
Bananymous 2025-12-27 23:46:25 +02:00
parent 280d3fd919
commit 6fbf1469aa
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,10 @@
#define assert(expr) ((expr) ? (void)0 : __assert_fail(#expr, __FILE__, __LINE__, __func__)) #define assert(expr) ((expr) ? (void)0 : __assert_fail(#expr, __FILE__, __LINE__, __func__))
#endif #endif
#if !defined(__cplusplus) && __STDC_VERSION__ >= 201112L && __STDC_VERSION__ < 202311L
#define static_assert _Static_assert
#endif
__BEGIN_DECLS __BEGIN_DECLS
__attribute__((noreturn)) __attribute__((noreturn))