mirror of
https://github.com/fluencelabs/musl
synced 2025-04-25 07:12:15 +00:00
do not define static_assert macro for pre-C11 compilers
some software simply uses static_assert if the macro is defined, and this breaks if the compiler does not recognize the _Static_assert keyword used to define it.
This commit is contained in:
parent
692b16d14b
commit
0ed932f34f
@ -8,7 +8,7 @@
|
|||||||
#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)))
|
#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
|
||||||
#define static_assert _Static_assert
|
#define static_assert _Static_assert
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user