coroutines: Prevent repeated error messages for missing promise.
If the user's coroutine return type omits the mandatory promise type then we will currently restate that error each time we see a coroutine keyword, which doesn't provide any new information. This suppresses all but the first instance in each coroutine. gcc/cp/ChangeLog: 2020-02-04 Iain Sandoe <iain@sandoe.co.uk> * coroutines.cc (find_promise_type): Delete unused forward declaration. (struct coroutine_info): Add a bool for no promise type error. (coro_promise_type_found_p): Only emit the error for a missing promise once in each affected coroutine. gcc/testsuite/ChangeLog: 2020-02-04 Iain Sandoe <iain@sandoe.co.uk> * g++.dg/coroutines/coro-missing-promise.C: New test.
Showing
Please
register
or
sign in
to comment