projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
692b16d
)
do not define static_assert macro for pre-C11 compilers
author
Rich Felker
<dalias@aerifal.cx>
Fri, 12 Feb 2016 15:11:40 +0000
(10:11 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Fri, 12 Feb 2016 15:11:40 +0000
(10:11 -0500)
some software simply uses static_assert if the macro is defined, and
this breaks if the compiler does not recognize the _Static_assert
keyword used to define it.
include/assert.h
patch
|
blob
|
history
diff --git
a/include/assert.h
b/include/assert.h
index 1ee02a4a5fb095d0cffacba1cc05a36a94633138..e679adbf8338ed3280230089fa4e2c871e27a129 100644
(file)
--- a/
include/assert.h
+++ b/
include/assert.h
@@
-8,7
+8,7
@@
#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)))
#endif
-#if
ndef __cplusplus
+#if
__STDC_VERSION__ >= 201112L && !defined(__cplusplus)
#define static_assert _Static_assert
#endif