]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix test when dual abi disabled
authorFrançois Dumont <frs.dumont@gmail.com>
Tue, 29 Jul 2025 04:32:52 +0000 (06:32 +0200)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 30 Jul 2025 19:16:31 +0000 (21:16 +0200)
When !_GLIBCXX_USE_DUAL_ABI the old COW std::string implementation is being used
which do not generate the expected error diagnostics.

libstdc++-v3/ChangeLog:

* testsuite/std/time/format/data_not_present_neg.cc: Remove _GLIBCXX_USE_DUAL_ABI
check.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/testsuite/std/time/format/data_not_present_neg.cc

index bb09451dc29ce66b2512527cd032017c9081f7f4..cb8f916f2166241dc3f2c4b2ad72a3d06ee1b17b 100644 (file)
@@ -119,7 +119,7 @@ auto tai = std::format("{:%Q}", tai_clock::now()); // { dg-error "call to conste
 auto file = std::format("{:%Q}", file_clock::now()); // { dg-error "call to consteval function" }
 
 const auto ltc = local_seconds(10s);
-#if _GLIBCXX_USE_CXX11_ABI || !_GLIBCXX_USE_DUAL_ABI
+#if _GLIBCXX_USE_CXX11_ABI
 const auto zt = zoned_time<seconds>("Europe/Sofia", local_seconds(10s));
 auto zt1 = std::format("{:%Q}", zt); // { dg-error "call to consteval function" "" { target cxx11_abi } }
 #endif
@@ -141,7 +141,7 @@ auto hms5 = std::format("{:%F}", HMS(1255s)); // { dg-error "call to consteval f
 auto hms6 = std::format("{:%Q}", HMS(1255s)); // { dg-error "call to consteval function" }
 auto hms7 = std::format("{:%Z}", HMS(1255s)); // { dg-error "call to consteval function" }
 
-#if _GLIBCXX_USE_CXX11_ABI || !_GLIBCXX_USE_DUAL_ABI
+#if _GLIBCXX_USE_CXX11_ABI
 auto li1 = std::format("{:%d}", local_info()); // { dg-error "call to consteval function" "" { target cxx11_abi } }
 auto li2 = std::format("{:%w}", local_info()); // { dg-error "call to consteval function" "" { target cxx11_abi } }
 auto li3 = std::format("{:%m}", local_info()); // { dg-error "call to consteval function" "" { target cxx11_abi } }