From 28f49e53bf4470b81654414064588673529bd4bb Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 18 Jan 2014 16:02:04 +0100 Subject: [PATCH] Add C11 static_assert to . --- libc/include/assert.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libc/include/assert.h b/libc/include/assert.h index 959cbb43..958eaa5a 100644 --- a/libc/include/assert.h +++ b/libc/include/assert.h @@ -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*);