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++/97729] [11 Regression] Link failure due to basic_stringbuf and others when building DLL on MinGW Date: Thu, 05 Nov 2020 18:01:38 +0000 [thread overview] Message-ID: <bug-97729-4-49Z9Ea4kt2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97729-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97729 --- Comment #7 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:710508c7b1a2c8e1d75d4c4f1ac79473dbf2b2bb commit r11-4749-g710508c7b1a2c8e1d75d4c4f1ac79473dbf2b2bb Author: Jonathan Wakely <jwakely@redhat.com> Date: Thu Nov 5 16:19:15 2020 +0000 libstdc++: Fix multiple definitions of std::exception_ptr functions [PR 97729] This fixes some multiple definition errors caused by the changes for PR libstdc++/90295. The previous solution for inlining the members of std::exception_ptr but still exporting them from the library was to suppress the 'inline' keyword on those functions when compiling libsupc++/eh_ptr.cc, so they get defined in that file. That produces ODR violations though, because there are now both inline and non-inline definitions in the library, due to the use of std::exception_ptr in other files sucg as src/c++11/future.cc. The new solution is to define all the relevant members as 'inline' unconditionally, but use __attribute__((used)) to cause definitions to be emitted in libsupc++/eh_ptr.cc as before. This doesn't quite work however, because PR c++/67453 means the attribute is ignored on constructors and destructors. As a workaround, the old solution (conditionally inline) is still used for those members, but they are given the always_inline attribute so that they aren't emitted in src/c++11/future.o as inline definitions. libstdc++-v3/ChangeLog: PR libstdc++/97729 * include/std/future (__basic_future::_M_get_result): Use nullptr for null pointer constant. * libsupc++/eh_ptr.cc (operator==, operator!=): Remove definitions. * libsupc++/exception_ptr.h (_GLIBCXX_EH_PTR_USED): Define macro to conditionally add __attribute__((__used__)). (operator==, operator!=, exception_ptr::exception_ptr()) (exception_ptr::exception_ptr(const exception_ptr&)) (exception_ptr::~exception_ptr()) (exception_ptr::operator=(const exception_ptr&)) (exception_ptr::swap(exception_ptr&)): Always define as inline. Add macro to be conditionally "used".
next prev parent reply other threads:[~2020-11-05 18:01 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-05 12:51 [Bug libstdc++/97729] New: " markus.boeck02 at gmail dot com 2020-11-05 13:48 ` [Bug libstdc++/97729] " redi at gcc dot gnu.org 2020-11-05 13:49 ` [Bug libstdc++/97729] [11 Regression] " redi at gcc dot gnu.org 2020-11-05 14:00 ` markus.boeck02 at gmail dot com 2020-11-05 14:05 ` redi at gcc dot gnu.org 2020-11-05 14:20 ` markus.boeck02 at gmail dot com 2020-11-05 14:37 ` redi at gcc dot gnu.org 2020-11-05 18:01 ` cvs-commit at gcc dot gnu.org 2020-11-05 18:01 ` cvs-commit at gcc dot gnu.org [this message] 2020-11-05 18:05 ` redi at gcc dot gnu.org 2020-11-05 18:05 ` redi at gcc dot gnu.org 2020-11-05 19:22 ` markus.boeck02 at gmail dot com 2020-11-05 19:32 ` redi at gcc dot gnu.org 2020-11-09 14:29 ` cvs-commit 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-97729-4-49Z9Ea4kt2@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).