[Bug c++/106973] coroutine generator and setjmp

iains at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 20 10:52:39 GMT 2022


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).


More information about the Gcc-bugs mailing list