https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99710
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> --- #include <coroutine> struct task { struct promise_type { std::suspend_always initial_suspend(); std::suspend_always final_suspend() noexcept; task get_return_object(); void return_void(); void unhandled_exception(); }; }; task my_coro () { try { } catch (...) { // [expr.await] co_await std::suspend_always{}; // { dg-error "We should have an error here" } } }