]> gcc.gnu.org Git - gcc.git/commit
coroutines: Pass lvalues to user-defined operator new [PR 100772].
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 3 Oct 2021 18:46:09 +0000 (19:46 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Fri, 17 Dec 2021 16:56:53 +0000 (16:56 +0000)
commit921942a8a106cb53994c21162922e4934eb3a3e0
tree81ba0d1396ae007d77c2af44f7afcd296f440852
parent39d2ec41509e3b0d130215a65d7aacbd064b5532
coroutines: Pass lvalues to user-defined operator new [PR 100772].

The wording of the standard has been clarified to be explicit that
the the parameters to any user-defined operator-new in the promise
class should be lvalues.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR c++/100772

gcc/cp/ChangeLog:

* coroutines.cc (morph_fn_to_coro): Convert function parms
from reference before constructing any operator-new args
list.

gcc/testsuite/ChangeLog:

* g++.dg/coroutines/pr100772-a.C: New test.
* g++.dg/coroutines/pr100772-b.C: New test.
gcc/cp/coroutines.cc
gcc/testsuite/g++.dg/coroutines/pr100772-a.C [new file with mode: 0644]
gcc/testsuite/g++.dg/coroutines/pr100772-b.C [new file with mode: 0644]
This page took 0.068705 seconds and 6 git commands to generate.