]> Savannah Git Hosting - gnulib.git/commitdiff
assert-h, verify: Make static_assert work in C++ mode on FreeBSD 11.
authorBruno Haible <bruno@clisp.org>
Sat, 28 Dec 2024 16:40:44 +0000 (17:40 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 31 Dec 2024 09:43:56 +0000 (10:43 +0100)
* lib/verify.h (static_assert): Override when using old versions of
clang++.

ChangeLog
lib/verify.h

index bdf29d5e48896f06355c7597a962b4f2f3893c8a..dc27be4ab8c7fd619f109bf406ad441907ebef3a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-12-28  Bruno Haible  <bruno@clisp.org>
+
+       assert-h, verify: Make static_assert work in C++ mode on FreeBSD 11.
+       * lib/verify.h (static_assert): Override when using old versions of
+       clang++.
+
 2024-12-28  Bruno Haible  <bruno@clisp.org>
 
        wchar: Fix wcrtomb prototype conflict in C++ mode on OpenBSD 6.0.
index 49a73c050888146a67ec4d4d1c04882555283a76..c4b6d5038413b105cc321ad2adfd8b6d0233f5ef 100644 (file)
@@ -255,6 +255,11 @@ template <int w>
 #  endif
 # endif
 /* Define static_assert if needed.  */
+# if defined __cplusplus && defined __clang__ && __clang_major__ < 9
+/* clang++ before commit 5c739665a8721228cf6143fd4ef95870a59f55ae had a
+   two-arguments static_assert but not the one-argument static_assert.  */
+#  undef static_assert
+# endif
 # if (!defined static_assert \
       && __STDC_VERSION__ < 202311 \
       && (!defined __cplusplus \