diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-10-13 03:46:01 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-10-13 03:46:01 +0200 |
commit | 4eaf05d461849a5365167e81f56cc328ecf4d053 (patch) | |
tree | 2183aee06b01433317314da64d88ae041f8261cb /include | |
parent | inclusion guard for assert.h do not guard definitions that depend on NDEBUG being unset (diff) | |
download | slibc-4eaf05d461849a5365167e81f56cc328ecf4d053.tar.gz slibc-4eaf05d461849a5365167e81f56cc328ecf4d053.tar.bz2 slibc-4eaf05d461849a5365167e81f56cc328ecf4d053.tar.xz |
static_assert is only defined if C11 is used
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/assert.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 /** |