aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.adb
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-10-17 11:21:11 +0100
committerIain Sandoe <iain@sandoe.co.uk>2020-10-19 20:22:37 +0100
commitb003c4b14b3f889e6707db68d2c6545eda7a203b (patch)
tree225cf2cb2538ac0e3bdfd2913e18966553e99e03 /gcc/ada/sinfo.adb
parent619f91eaa8c8a50f1f9d3e7b96ee837037f0e806 (diff)
downloadgcc-b003c4b14b3f889e6707db68d2c6545eda7a203b.zip
gcc-b003c4b14b3f889e6707db68d2c6545eda7a203b.tar.gz
gcc-b003c4b14b3f889e6707db68d2c6545eda7a203b.tar.bz2
coroutines: Emit error for invalid promise return types [PR97438].
At one stage, use cases were proposed for allowing the promise type to contain both return_value and return_void. That was not accepted into C++20, so we should reject it as per the PR. gcc/cp/ChangeLog: PR c++/97438 * coroutines.cc (struct coroutine_info): Add a field to record that we emitted a promise type error. (coro_promise_type_found_p): Check for the case that the promise type contains both return_void and return_value. Emit an error if so, with information about the wrong type methods. gcc/testsuite/ChangeLog: PR c++/97438 * g++.dg/coroutines/pr97438.C: New test.
Diffstat (limited to 'gcc/ada/sinfo.adb')
0 files changed, 0 insertions, 0 deletions