Add C11 static_assert to <assert.h>.
This commit is contained in:
parent
f13074afd1
commit
28f49e53bf
|
@ -36,6 +36,11 @@ __BEGIN_DECLS
|
||||||
#define __ASSERT_VOID_CAST(x) (void) x
|
#define __ASSERT_VOID_CAST(x) (void) x
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* The C11 static_assert macro expands to the _Static_assert keyword. */
|
||||||
|
#if defined(__STDC_VERSION__) && 201112L <= __STDC_VERSION__
|
||||||
|
#define static_assert _Static_assert
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The actual implementation of assert. */
|
/* The actual implementation of assert. */
|
||||||
__attribute__((noreturn))
|
__attribute__((noreturn))
|
||||||
void __assert(const char*, unsigned long, const char*, const char*);
|
void __assert(const char*, unsigned long, const char*, const char*);
|
||||||
|
|
Loading…
Reference in New Issue