summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-02-12 10:11:40 -0500
committerRich Felker <dalias@aerifal.cx>2016-02-12 10:11:40 -0500
commit0ed932f34f11663e6b3ddfa866b1798a5938a3dc (patch)
tree774435b762433c1e6811368cd8a1958e9914ddd0
parent692b16d14b913676567be82a56211adc250793c7 (diff)
downloadmusl-0ed932f34f11663e6b3ddfa866b1798a5938a3dc.tar.gz
do not define static_assert macro for pre-C11 compilers
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.
-rw-r--r--include/assert.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/assert.h b/include/assert.h
index 1ee02a4a..e679adbf 100644
--- 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
-#ifndef __cplusplus
+#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
#define static_assert _Static_assert
#endif