From e6c9cb69c8c0a4ef9ce0538d7b4106dad3d7ad47 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 26 May 2024 07:04:19 -0700 Subject: [PATCH] Port C11 test to C++20 Trivial fix suggested by Peter Johansson in: https://lists.gnu.org/r/autoconf/2024-05/msg00004.html * lib/autoconf/c.m4 (_AC_CXX_CXX11_TEST_MAIN): Do not test assigning u8"..." to char const *, as this runs afoul of C++20. --- NEWS | 5 +++++ lib/autoconf/c.m4 | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index be7cb8ca4..20dbc1734 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,11 @@ GNU Autoconf NEWS - User visible changes. C11 and later. Programs can use AC_C_VARARRAYS and __STDC_NO_VLA__ to use VLAs if available. +** Notable bug fixes + +*** AC_PROG_CXX no longer rejects C++20 compilers +merely because C++20 is not upward-compatible with C++11. + * Noteworthy changes in release 2.72 (2023-12-22) [release] ** Backward incompatibilities diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 89f6a6088..150bb8146 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -2758,8 +2758,7 @@ ac_cxx_conftest_cxx11_main=' test_template<::test_template> v(test_template(12)); } { - // Unicode literals - char const *utf8 = u8"UTF-8 string \u2500"; + // Unicode literals. Do not test u8"..." as C++20 would reject it. char16_t const *utf16 = u"UTF-8 string \u2500"; char32_t const *utf32 = U"UTF-32 string \u2500"; } -- 2.47.3