diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-02-04 09:36:30 +0000 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2020-02-04 09:37:18 +0000 |
commit | 5bc9d2f5ed4c39a7cad74db34e2bb125e012fa60 (patch) | |
tree | 037d790615997f3e62038b01203bec37b3b772a6 /libcpp/init.c | |
parent | 5f0653a8b75a5ad5a5405a27dd92d3a5759eed4c (diff) | |
download | gcc-5bc9d2f5ed4c39a7cad74db34e2bb125e012fa60.zip gcc-5bc9d2f5ed4c39a7cad74db34e2bb125e012fa60.tar.gz gcc-5bc9d2f5ed4c39a7cad74db34e2bb125e012fa60.tar.bz2 |
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.
Diffstat (limited to 'libcpp/init.c')
0 files changed, 0 insertions, 0 deletions