https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106973
--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #5) > The standard says: > > > A call to setjmp or longjmp has undefined behavior if invoked in a > > suspension context of a coroutine (7.6.2.4). > > Given that, I don't see why using setjmp in example would be useful. Exactly, but maybe we should diagnose (we should not crash anyway).