Add C11 static_assert to <assert.h>.

This commit is contained in:
Jonas 'Sortie' Termansen 2014-01-18 16:02:04 +01:00
parent f13074afd1
commit 28f49e53bf
1 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,11 @@ __BEGIN_DECLS
#define __ASSERT_VOID_CAST(x) (void) x
#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. */
__attribute__((noreturn))
void __assert(const char*, unsigned long, const char*, const char*);