public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-5966] Fix '23_containers/span/at.cc' for '-fno-exceptions' configurations Date: Wed, 29 Nov 2023 13:13:12 +0000 (GMT) [thread overview] Message-ID: <20231129131312.8022F382DC44@sourceware.org> (raw) https://gcc.gnu.org/g:762b428815d4e762abdff5c1ffc1e9aa60da7870 commit r14-5966-g762b428815d4e762abdff5c1ffc1e9aa60da7870 Author: Thomas Schwinge <thomas@codesourcery.com> Date: Tue Nov 28 17:30:13 2023 +0100 Fix '23_containers/span/at.cc' for '-fno-exceptions' configurations Added in recent commit 1fa85dcf656e2f2c7e483c9ed3c2680bf7db6858 "libstdc++: Add std::span::at for C++26 (P2821R5)", the test case already does use '#if __cpp_exceptions', but failed to correspondingly guard the 'dg-warning' directives, resulting in: FAIL: 23_containers/span/at.cc -std=gnu++26 (test for warnings, line 15) FAIL: 23_containers/span/at.cc -std=gnu++26 (test for warnings, line 26) PASS: 23_containers/span/at.cc -std=gnu++26 (test for excess errors) PASS: 23_containers/span/at.cc -std=gnu++26 execution test libstdc++-v3/ * testsuite/23_containers/span/at.cc: Fix for '-fno-exceptions' configurations. Diff: --- libstdc++-v3/testsuite/23_containers/span/at.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/testsuite/23_containers/span/at.cc b/libstdc++-v3/testsuite/23_containers/span/at.cc index dc4d8e3e8eb..6f6fc396bc7 100644 --- a/libstdc++-v3/testsuite/23_containers/span/at.cc +++ b/libstdc++-v3/testsuite/23_containers/span/at.cc @@ -12,7 +12,7 @@ test_at() VERIFY(s.at(2) == 2); #if __cpp_exceptions try { - s.at(4); // { dg-warning "ignoring return value" } + s.at(4); // { dg-warning "ignoring return value" "" { target exceptions_enabled } } VERIFY(false); } catch (const std::out_of_range&) { } @@ -23,7 +23,7 @@ test_at() VERIFY(s2.at(1) == 2); #if __cpp_exceptions try { - s2.at(2); // { dg-warning "ignoring return value" } + s2.at(2); // { dg-warning "ignoring return value" "" { target exceptions_enabled } } VERIFY(false); } catch (const std::out_of_range&) { }
reply other threads:[~2023-11-29 13:13 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20231129131312.8022F382DC44@sourceware.org \ --to=tschwinge@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).