v_static_assert vs. stdc

C11 has _Static_assert and static_assert via assert.h, which we can not include.

C23 has static_assert and deprecated _Static_assert
parent b662a889
......@@ -114,7 +114,11 @@ do { \
# define __has_extension(x) 0
#endif
#if __has_extension(c_static_assert)
#if __STDC_VERSION__ - 0 >= 202311L
# define v_static_assert static_assert
#elif __STDC_VERSION__ - 0 >= 201112L
# define v_static_assert _Static_assert
#elif __has_extension(c_static_assert)
# define v_static_assert _Static_assert
#elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus)
# define v_static_assert _Static_assert
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment