[PATCH RFC] do not throw in std::make_exception_ptr
Jonathan Wakely
jwakely@redhat.com
Wed Aug 3 09:55:00 GMT 2016
On 03/08/16 10:48 +0100, Jonathan Wakely wrote:
>On 28/07/16 10:20 +0300, Gleb Natapov wrote:
>>+extern "C" __cxa_refcounted_exception*
>>+__cxxabiv1::__cxa_init_primary_exception(void *obj, const std::type_info *tinfo,
>>+ void (_GLIBCXX_CDTOR_CALLABI *dest) (void *))
>>+{
>>+ __cxa_refcounted_exception *header
>>+ = __get_refcounted_exception_header_from_obj (obj);
>>+ header->referenceCount = 0;
>>+ header->exc.exceptionType = tinfo;
>>+ header->exc.exceptionDestructor = dest;
>>+ header->exc.unexpectedHandler = std::get_unexpected ();
>>+ header->exc.terminateHandler = std::get_terminate ();
>>+ __GXX_INIT_PRIMARY_EXCEPTION_CLASS(header->exc.unwindHeader.exception_class);
>>+ header->exc.unwindHeader.exception_cleanup = __gxx_exception_cleanup;
>>+
>>+ return header;
>>+}
>
>I'd like to see any additions like this function discussed on the C++
>ABI list, so we at least have an idea whether other vendors would
>consider implementing it too.
Oops, I meant to delete that comment. Please ignore it!
You're only suggesting a new function in the "GNU extensions" part of
our header, and it's only needed in our make_exception_ptr function,
not required by any of the actual runtime files in libsupc++. So
there's no need for it to be common to other implementations of the
ABI.
More information about the Libstdc++
mailing list