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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> BTW, does the standard require that in all standard headers where these
> exceptions can be thrown the corresponding exception types have to be
> defined,

No

> or are the __throw_* functions just trying to make the throwing
> possible even in headers which don't need to declare those?

I don't know if that's the original purpose of those functions, but it's
certainly one benefit.

> Is the use of extern __throw_* fndecls just a header optimization?
> Could those class types be moved into new bits/ header files and included
> from bits/funcexcept.h for C++26?

They could be, yes, and they might need to be.

Reply via email to