https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98861

--- Comment #14 from cqwrteur <unlvsur at live dot com> ---
(In reply to Jonathan Wakely from comment #13)
> (In reply to cqwrteur from comment #11)
> > Functions without thread-safety are always terrible. Like all functions in
> > cctype. They should be avoided like plague.
> 
> It's thread-safe though. What are you talking about?

It calls std::abort() and std::abort() will close FILE* and FILE* might not be
thread-safe.

BTW std::terminate() is slow compared to compiler intrinsic like
__builtin_trap().

> (In reply to cqwrteur from comment #12)
> > stdio.h should not get included in any circumstances for EH. You are
> > implementing the operating system, but you need to enable EH by the standard
> > and EH relies on stdio. Chicken-egg problem.
> 
> It doesn't depend on stdio though. What are you talking about?

https://github.com/gcc-mirror/gcc/blob/e11e5d3889f9e54c547efee50fa1b72b50f0f265/libstdc%2B%2B-v3/libsupc%2B%2B/vterminate.cc#L93

Reply via email to