From e993a048cf8c58755da7c3b358cadf2f598bbff3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 13 Sep 2022 23:01:53 -0500 Subject: [PATCH] verify: treat GNU C++ 6 like recent C++ * lib/verify.h (_GL_VERIFY): * m4/assert_h.m4 (gl_ASSERT_H): If we check __cpp_static_assert < 200410, also check __GNUG__ < 6, for consistency with the previous change. --- ChangeLog | 7 +++++++ m4/assert_h.m4 | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 81183fa619..2e04ffd8d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2022-09-13 Paul Eggert + + verify: treat GNU C++ 6 like recent C++ + * m4/assert_h.m4 (gl_ASSERT_H): + If we check __cpp_static_assert < 201411, also check __GNUG__ < 6, + for consistency with the previous change. + 2022-09-13 Bruno Haible verify: Avoid syntax error due to static_assert with GNU C++ 6.x. diff --git a/m4/assert_h.m4 b/m4/assert_h.m4 index 36b3c78c91..ec756a970b 100644 --- a/m4/assert_h.m4 +++ b/m4/assert_h.m4 @@ -47,7 +47,8 @@ AC_DEFUN([gl_ASSERT_H], dnl including assert.h. Break the #undef apart with a comment dnl so that 'configure' does not comment it out. AH_VERBATIM([zzstatic_assert], -[#if !defined HAVE_C_STATIC_ASSERT && __cpp_static_assert < 201411 +[#if (!defined HAVE_C_STATIC_ASSERT \ + && __cpp_static_assert < 201411 && __GNUG__ < 6) #include #undef/**/assert #endif]) -- 2.37.2