Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/include Remove the static_assert() fallback for pre-C11 and ...



details:   https://anonhg.NetBSD.org/src/rev/cf76b3b7f5ae
branches:  trunk
changeset: 1009234:cf76b3b7f5ae
user:      kamil <kamil%NetBSD.org@localhost>
date:      Fri Apr 17 15:22:34 2020 +0000

description:
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:

 include/assert.h |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (21 lines):

diff -r 2f2620f73af4 -r cf76b3b7f5ae include/assert.h
--- a/include/assert.h  Fri Apr 17 14:59:23 2020 +0000
+++ b/include/assert.h  Fri Apr 17 15:22:34 2020 +0000
@@ -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 @@
 __END_DECLS
 #endif /* __ASSERT_DECLARED */
 
+#if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L
 #ifndef static_assert
-#if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L
 #define static_assert _Static_assert
-#elif defined(_NETBSD_SOURCE) && (__cplusplus - 0) < 201103L
-#define static_assert(x, y) __CTASSERT(x)
 #endif /* static_assert */
 #endif



Home | Main Index | Thread Index | Old Index