[committed] libstdc++: Ensure language linkage of std::__terminate()

Jonathan Wakely jwakely@redhat.com
Wed Oct 13 09:44:32 GMT 2021


On 11/10/21 20:38 +0100, Jonathan Wakely wrote:
>On 08/10/21 12:23 +0100, Jonathan Wakely wrote:
>>This adds an inline wrapper for std::terminate that doesn't add the
>>declaration of std::terminate to namespace std. This allows the
>>library to terminate without including all of <exception>.
>>
>>libstdc++-v3/ChangeLog:
>>
>>	* include/bits/atomic_timed_wait.h: Remove unused header.
>>	* include/bits/c++config (std:__terminate): Define.
>>	* include/bits/semaphore_base.h: Remove <exception> and use
>>	__terminate instead of terminate.
>>	* include/bits/std_thread.h: Likewise.
>>	* libsupc++/eh_terminate.cc (std::terminate): Use qualified-id
>>	to call __cxxabiv1::__terminate.
>>
>>
>>This avoids including a few thousand lines of <exception> just for one
>>function declaration. Any objections or better ideas?
>
>I've pushed this to trunk now.

And now I've pushed this fix for it too.

Tested x86_64-linux.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1078 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211013/0c32ac45/attachment-0001.bin>


More information about the Gcc-patches mailing list