[PATCH] D108905: [ItaniumCXXABI] Make __cxa_end_catch calls unconditionally nounwind

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 9 19:35:06 PDT 2021


ChuanqiXu added a comment.

In D108905#2975806 <https://reviews.llvm.org/D108905#2975806>, @rjmccall wrote:

> In D108905#2975712 <https://reviews.llvm.org/D108905#2975712>, @rsmith wrote:
>
>> No decision as yet, but so far it looks very likely that we'll settle on the rule that exceptions cannot have potentially-throwing destructors, and that we should reject `throw`s of such types. I don't think that should be applied retroactively to C++98, though, because destructors were not implicitly non-throwing back then.
>
> Is the committee comfortable with implementations causing potentially-throwing exception destructors to trigger `std::terminate`?  I understand that this is a weird question because it implies the use of / interoperation with an old language standard, but we do need to know how to compile in C++98 mode, and we may need to demote this to a warning pre-C++23.  If it's not an error in old modes, but the committee doesn't approve of calling `std::terminate` if it happens, then we still need to compile `catch (...)` as throwing in case we're interoperating.

@rjmccall @rsmith Do you think it makes sense to make `__cxa_end_catch` nounwind  conditionally? I mean, in higher standard than C++98, we could make `__cxa_end_catch` nounwind.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108905/new/

https://reviews.llvm.org/D108905



More information about the cfe-commits mailing list