[Bug c++/100772] Templated coroutine new function's arguments have incorrect value categories/overload selection
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 27 12:55:49 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100772
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:
https://gcc.gnu.org/g:f647906ef227bc22af224d955a408d776cfddb04
commit r11-11542-gf647906ef227bc22af224d955a408d776cfddb04
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Sun Oct 3 19:46:09 2021 +0100
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.
(cherry picked from commit 921942a8a106cb53994c21162922e4934eb3a3e0)
More information about the Gcc-bugs
mailing list