From 7df0390c04759342f8edcab7d62963a55d88a586 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 18 Sep 2022 21:12:52 +0200 Subject: [PATCH] verify: Avoid syntax error due to static_assert with GNU C++ 6.x. * lib/verify.h (static_assert): Don't define in GNU C++ 6 or newer. --- ChangeLog | 5 +++++ lib/verify.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8ef0c1e0ba..e0179059d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2022-09-13 Bruno Haible + + verify: Avoid syntax error due to static_assert with GNU C++ 6.x. + * lib/verify.h (static_assert): Don't define in GNU C++ 6 or newer. + 2022-09-12 Bruno Haible supersede: Avoid a failure when writing to /dev/null in Solaris zones. diff --git a/lib/verify.h b/lib/verify.h index 47b6ee661b..4217afd92c 100644 --- a/lib/verify.h +++ b/lib/verify.h @@ -226,7 +226,7 @@ template # define _Static_assert(...) \ _GL_VERIFY (__VA_ARGS__, "static assertion failed", -) # endif -# if __cpp_static_assert < 201411 && !defined static_assert +# if __cpp_static_assert < 201411 && __GNUG__ < 6 && !defined static_assert # define static_assert _Static_assert /* C11 requires this #define. */ # endif #endif -- 2.39.5