aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2codeview.cc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2024-08-17 15:47:58 +0100
committerIain Sandoe <iain@sandoe.co.uk>2024-08-24 19:53:51 +0100
commita0b431033c307982123abbff752045cfe7eda47f (patch)
tree3b7dd5ee47d823152a0a6849aabf2cb395dc59db /gcc/dwarf2codeview.cc
parentefc99ab2d5fdb7f2a942199b0e5b16e1e2bb8c27 (diff)
downloadgcc-a0b431033c307982123abbff752045cfe7eda47f.zip
gcc-a0b431033c307982123abbff752045cfe7eda47f.tar.gz
gcc-a0b431033c307982123abbff752045cfe7eda47f.tar.bz2
c++, coroutines: Only allow void get_return_object if the ramp is void [PR100476].
Require that the value returned by get_return_object is convertible to the ramp return. This means that the only time we allow a void get_return_object, is when the ramp is also a void function. We diagnose this early to allow us to exit the ramp build if the return values are incompatible. PR c++/100476 gcc/cp/ChangeLog: * coroutines.cc (cp_coroutine_transform::build_ramp_function): Remove special handling of void get_return_object expressions. gcc/testsuite/ChangeLog: * g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C: Adjust expected diagnostic. * g++.dg/coroutines/pr102489.C: Avoid void get_return_object. * g++.dg/coroutines/pr103868.C: Likewise. * g++.dg/coroutines/pr94879-folly-1.C: Likewise. * g++.dg/coroutines/pr94883-folly-2.C: Likewise. * g++.dg/coroutines/pr96749-2.C: Likewise. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
Diffstat (limited to 'gcc/dwarf2codeview.cc')
0 files changed, 0 insertions, 0 deletions