From: François Dumont Date: Tue, 29 Jul 2025 04:32:52 +0000 (+0200) Subject: libstdc++: Fix test when dual abi disabled X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec7244e6e09654a2e720d60ceb0f24c6d66c44f7;p=thirdparty%2Fgcc.git libstdc++: Fix test when dual abi disabled 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 --- diff --git a/libstdc++-v3/testsuite/std/time/format/data_not_present_neg.cc b/libstdc++-v3/testsuite/std/time/format/data_not_present_neg.cc index bb09451dc29..cb8f916f216 100644 --- a/libstdc++-v3/testsuite/std/time/format/data_not_present_neg.cc +++ b/libstdc++-v3/testsuite/std/time/format/data_not_present_neg.cc @@ -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("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 } }