]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Port C11 test to C++20
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 May 2024 14:04:19 +0000 (07:04 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 May 2024 14:18:32 +0000 (07:18 -0700)
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
lib/autoconf/c.m4

diff --git a/NEWS b/NEWS
index be7cb8ca4a6e6b4da7a068af830bc954e68a819d..20dbc1734d983849fd0be54e39db8c2eb60362d5 100644 (file)
--- 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
index 89f6a60884fe0df2b9db3a838ae0577654783b86..150bb8146ece3650555c95c28a5e17302d61adf9 100644 (file)
@@ -2758,8 +2758,7 @@ ac_cxx_conftest_cxx11_main='
   test_template<::test_template<int>> v(test_template<int>(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";
 }