public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/103630] [9/10/11/12 Regression] std::make_exception_ptr<T&>(t) is ill-formed Date: Thu, 09 Dec 2021 23:29:35 +0000 [thread overview] Message-ID: <bug-103630-4-3VRJYw0Zk4@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103630-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103630 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:a1ca039fc0fe934ef36c25d8284e6e116bcaffa7 commit r12-5879-ga1ca039fc0fe934ef36c25d8284e6e116bcaffa7 Author: Jonathan Wakely <jwakely@redhat.com> Date: Thu Dec 9 13:54:39 2021 +0000 libstdc++: Fix std::exception_ptr regressions [PR103630] This restores support for std::make_exception_ptr<E&> and for using std::exception_ptr in C++98. Because the new non-throwing implementation needs to use std::decay to handle references the original throwing implementation is used for C++98. We also need to change the typeid expression so it doesn't yield the dynamic type when the function parameter is a reference to a polymorphic type. Otherwise the new exception object could be caught by any handler matching the dynamic type, even though the actual exception object is only a copy of the base class, sliced to the static type. libstdc++-v3/ChangeLog: PR libstdc++/103630 * libsupc++/exception_ptr.h (exception_ptr): Fix exception specifications on inline definitions. (make_exception_ptr): Decay the template parameter. Use typeid of the static type. * testsuite/18_support/exception_ptr/103630.cc: New test.
next prev parent reply other threads:[~2021-12-09 23:29 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-09 13:36 [Bug libstdc++/103630] New: " redi at gcc dot gnu.org 2021-12-09 13:37 ` [Bug libstdc++/103630] " redi at gcc dot gnu.org 2021-12-09 13:53 ` redi at gcc dot gnu.org 2021-12-09 23:29 ` cvs-commit at gcc dot gnu.org [this message] 2021-12-09 23:33 ` [Bug libstdc++/103630] [9/10/11 " redi at gcc dot gnu.org 2022-04-07 10:06 ` rguenth at gcc dot gnu.org 2022-04-12 20:18 ` cvs-commit at gcc dot gnu.org 2022-04-12 20:30 ` [Bug libstdc++/103630] [9/10 " redi at gcc dot gnu.org 2022-04-26 13:12 ` cvs-commit at gcc dot gnu.org 2022-04-26 13:14 ` [Bug libstdc++/103630] [9 " redi at gcc dot gnu.org 2022-05-09 16:40 ` cvs-commit at gcc dot gnu.org 2022-05-09 16:50 ` redi at gcc dot gnu.org
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=bug-103630-4-3VRJYw0Zk4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).