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

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 31 15:53:40 PDT 2021


rjmccall added a comment.

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.


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