public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8401] c++: add test [PR113347] Date: Wed, 24 Jan 2024 19:42:33 +0000 (GMT) [thread overview] Message-ID: <20240124194234.2A4E33858420@sourceware.org> (raw) https://gcc.gnu.org/g:aedfdd340cbb4a97a8f6d432720a4df374c1e467 commit r14-8401-gaedfdd340cbb4a97a8f6d432720a4df374c1e467 Author: Jason Merrill <jason@redhat.com> Date: Tue Jan 23 16:09:15 2024 -0500 c++: add test [PR113347] The patch for this PR is unneeded on trunk, but let's add the test. PR c++/113347 gcc/testsuite/ChangeLog: * g++.dg/eh/return3.C: New test. Diff: --- gcc/testsuite/g++.dg/eh/return3.C | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gcc/testsuite/g++.dg/eh/return3.C b/gcc/testsuite/g++.dg/eh/return3.C new file mode 100644 index 00000000000..76aa50d523d --- /dev/null +++ b/gcc/testsuite/g++.dg/eh/return3.C @@ -0,0 +1,17 @@ +// PR c++/113347 + +#if __cplusplus < 201103L +#define THROWS +#else +#define THROWS noexcept(false) +#endif + +struct A { ~A(); }; +struct B { ~B() THROWS; }; + +A f() +{ + A a; + return a; + B(); +}
reply other threads:[~2024-01-24 19:42 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=20240124194234.2A4E33858420@sourceware.org \ --to=jason@gcc.gnu.org \ --cc=gcc-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).