* lib/verify.h (static_assert): Don't define in clang C++ 6 or newer.
* m4/assert_h.m4 (gl_ASSERT_H): If we don't need to define static_assert
with clang in C++ mode, don't include <assert.h>.
+2022-09-14 Bruno Haible <bruno@clisp.org>
+
+ verify: Avoid syntax error due to static_assert with clang in C++ mode.
+ * lib/verify.h (static_assert): Don't define in clang C++ 6 or newer.
+ * m4/assert_h.m4 (gl_ASSERT_H): If we don't need to define static_assert
+ with clang in C++ mode, don't include <assert.h>.
+
2022-09-14 Paul Eggert <eggert@cs.ucla.edu>
assert-h: work around include confusion
# endif
# if (!defined static_assert \
&& __STDC_VERSION__ < 202311 \
- && __cpp_static_assert < 201411 && __GNUG__ < 6)
+ && (!defined __cplusplus \
+ || (__cpp_static_assert < 201411 \
+ && __GNUG__ < 6 && __clang_major__ < 6)))
# if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__
/* MSVC 14 in C++ mode supports the two-arguments static_assert but not
the one-argument static_assert, and it does not support _Static_assert.
dnl so that 'configure' does not comment it out.
AH_VERBATIM([zzstatic_assert],
[#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \
- && __cpp_static_assert < 201411 && __GNUG__ < 6)
+ && (!defined __cplusplus \
+ || (__cpp_static_assert < 201411 \
+ && __GNUG__ < 6 && __clang_major__ < 6)))
#include <assert.h>
#undef/**/assert
#endif])