LibC: define static_assert in assert.h
This is needed from C11 until C23
This commit is contained in:
parent
280d3fd919
commit
6fbf1469aa
|
|
@ -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))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue