From 4eaf05d461849a5365167e81f56cc328ecf4d053 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 13 Oct 2015 03:46:01 +0200 Subject: static_assert is only defined if C11 is used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/assert.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/assert.h b/include/assert.h index 9dd8f4c..c3d69f3 100644 --- a/include/assert.h +++ b/include/assert.h @@ -71,6 +71,7 @@ +#if defined(__C11__) /** * A compile-time error should occur if the expression * evaluates to zero. @@ -78,7 +79,8 @@ * @param expression:scalar The expression to evaluate. * @param message:const char* The message to print on error. */ -#define static_assert _Static_assert +# define static_assert _Static_assert +#endif /** -- cgit v1.2.3-70-g09d2