This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libstdc++/52104 - fix linker error for non-TLS targets


The out-of-line destructor in future.cc uses std::call_once which uses
a lambda on TLS targets. Because we compile with
-fno-implicit-templates an explicit instantiation is needed, but can't
be done because the closure type created by the lambda can't be named.
 This puts the destructor inline in the header for TLS targets.  A
better fix would be to avoid using a lambda in std::call_once, but I
don't want to touch that code instage4.

        PR libstdc++/52104
        * include/std/future (__future_base::_Async_state_common): Define
        destructor inline for targets without TLS.
        * src/c++11/future.cc (__future_base::_Async_state_common): Only
        define destructor for TLS targets.

Tested x86_64-linux by me and on sparc-solaris by Eric Botcazou.
Committed to trunk.

Attachment: 52104.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]