From 4279937c70d6cfef34f758c0a852d25e05a175c0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 16 Oct 2012 19:00:29 +0000 Subject: [PATCH] * libc/include/assert.h (static_assert): Define. --- newlib/ChangeLog | 4 ++++ newlib/libc/include/assert.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index b89eb214..e951bf03 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,7 @@ +2012-10-16 Aurelien Jacobs + + * libc/include/assert.h (static_assert): Define. + 2012-10-15 Corinna Vinschen * libc/include/sys/features.h (__GNUC_PREREQ): Define. Use diff --git a/newlib/libc/include/assert.h b/newlib/libc/include/assert.h index e542b214..91bb040c 100644 --- a/newlib/libc/include/assert.h +++ b/newlib/libc/include/assert.h @@ -41,6 +41,10 @@ void _EXFUN(__assert, (const char *, int, const char *) void _EXFUN(__assert_func, (const char *, int, const char *, const char *) _ATTRIBUTE ((__noreturn__))); +#if __STDC_VERSION__ >= 201112L && !defined __cplusplus +# define static_assert _Static_assert +#endif + #ifdef __cplusplus } #endif -- 2.39.2