summaryrefslogtreecommitdiff
path: root/include/assert.h
diff options
context:
space:
mode:
authorkamil <kamil@NetBSD.org>2020-04-17 15:22:34 +0000
committerkamil <kamil@NetBSD.org>2020-04-17 15:22:34 +0000
commit85db71788abd49b3c88366465b9eabe379d4e5f5 (patch)
treeec78f458f9be93aa54d64b088e4b740fd3439437 /include/assert.h
parent507c62f305b0aaeff31576efdaf422a6287a7a6a (diff)
Remove the static_assert() fallback for pre-C11 and pre-C++11
C++ without real static_assert() can be incompatible with the C fallback as presented in openjdk. A pre-C11 compiler can be picky on the implementation.
Diffstat (limited to 'include/assert.h')
-rw-r--r--include/assert.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/assert.h b/include/assert.h
index f3f39b5f104..6c3729cd640 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -1,4 +1,4 @@
-/* $NetBSD: assert.h,v 1.24 2019/05/27 07:31:11 kamil Exp $ */
+/* $NetBSD: assert.h,v 1.25 2020/04/17 15:22:34 kamil Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -105,10 +105,8 @@ void __diagassert13(const char *, int, const char *, const char *);
__END_DECLS
#endif /* __ASSERT_DECLARED */
-#ifndef static_assert
#if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L
+#ifndef static_assert
#define static_assert _Static_assert
-#elif defined(_NETBSD_SOURCE) && (__cplusplus - 0) < 201103L
-#define static_assert(x, y) __CTASSERT(x)
#endif /* static_assert */
#endif