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

2023-10-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I'd vote for something like `-fassume-nothrow-exception-dtor` or `-fenforce-nothrow-exception-dtor` depending on if the patch will also implement the enforcement mentioned in https://github.com/llvm/llvm-project/issues/57375#issuecomment-1230590204, but we can bikeshed

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

2023-10-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D108905#4654411 , @MaskRay wrote: > In D108905#4654410 , @smeenai wrote: > >> In D108905#4654403 , @ChuanqiXu >> wrote: >> >>> In D108905#46

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

2023-10-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D108905#4654410 , @smeenai wrote: > In D108905#4654403 , @ChuanqiXu > wrote: > >> In D108905#4654393 , @smeenai >> wrote: >> >>> In D108905#2

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

2023-10-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D108905#4654403 , @ChuanqiXu wrote: > In D108905#4654393 , @smeenai wrote: > >> In D108905#2975712 , @rsmith wrote: >> >>> No decision as yet,

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

2023-10-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D108905#4654393 , @smeenai wrote: > In D108905#2975712 , @rsmith wrote: > >> No decision as yet, but so far it looks very likely that we'll settle on the >> rule that exceptions cann

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

2023-10-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Herald added subscribers: pmatos, asb. Herald added a project: All. In 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

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

2021-09-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D108905#2975806 , @rjmccall wrote: > In D108905#2975712 , @rsmith wrote: > >> No decision as yet, but so far it looks very likely that we'll settle on the >> rule that exceptions can

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

2021-08-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In 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 suc

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

2021-08-31 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. 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

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

2021-08-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, Richard. Fangrui, I think we can't do anything on this patch without a CWG decision about the right semantics, so this will have to sit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108905/new/ https://reviews.l

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

2021-08-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I've forwarded the question here onto CWG, with Arthur's example and the suggestion that maybe we shouldn't allow throwing an exception with a non-noexcept destructor. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108905/ne

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

2021-08-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D108905#2973172 , @modimo wrote: > In D108905#2973099 , @rjmccall > wrote: > >> Yeah, I think this is the most natural interpretation of the current >> standard. But that would be a

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

2021-08-30 Thread Di Mo via Phabricator via cfe-commits
modimo added a comment. In D108905#2973099 , @rjmccall wrote: > Yeah, I think this is the most natural interpretation of the current > standard. But that would be a very unfortunate rule, because people who > write `catch (...) {}` do reasonably expect

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

2021-08-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D108905#2973066 , @modimo wrote: > In D108905#2971861 , @rjmccall > wrote: > >> I'm not really sure what the standard expects to happen if an exception >> destructor throws. The sta

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

2021-08-30 Thread Di Mo via Phabricator via cfe-commits
modimo added a comment. In D108905#2971861 , @rjmccall wrote: > I'm not really sure what the standard expects to happen if an exception > destructor throws. The standard tells us when the destruction happens — the > latest point it can — but that claus

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

2021-08-30 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. > Well, I'm saying two things. First, it is not clear to me what the expected > behavior of that code is under the standard. The fact that it appears to work > in one particular implementation is not in any way conclusive; we have to > look at the specification. Ah

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

2021-08-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Well, I'm saying two things. First, it is not clear to me what the expected behavior of that code is under the standard. The fact that it appears to work in one particular implementation is not in any way conclusive; we have to look at the specification. Second, I t

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

2021-08-30 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. Peanut gallery says: Does this godbolt demonstrate the situation where "destroying an exception can throw an exception"? https://godbolt.org/z/Ghjz53rrj You're not proposing to change the behavior of this program, are you? (If you're proposing to change it: I don't th

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

2021-08-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 369467. MaskRay retitled this revision from "[ItaniumCXXABI] Set nounwind on __cxa_begin_catch/__cxa_end_catch" to "[ItaniumCXXABI] Make __cxa_end_catch calls unconditionally nounwind". MaskRay edited the summary of this revision. MaskRay added a comment. Her