https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94682

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <ia...@gcc.gnu.org>:

https://gcc.gnu.org/g:38644f81babd04820daa9d622ea75eb68c066c86

commit r10-7868-g38644f81babd04820daa9d622ea75eb68c066c86
Author: Iain Sandoe <i...@sandoe.co.uk>
Date:   Wed Apr 22 09:49:20 2020 +0100

    coroutines: Pass class reference to promise param preview [PR94682]

    As reported in the PR, per [dcl.fct.def.coroutine]/4 we should
    be passing a reference to the object to the promise parameter
    preview, and we are currently passing a pointer (this).  Amend to
    pass the reference.

    gcc/cp/ChangeLog:

    2020-04-22  Iain Sandoe  <i...@sandoe.co.uk>

            PR c++/94682
            * coroutines.cc (struct param_info): Add a field to note that
            the param is 'this'.
            (morph_fn_to_coro): Convert this to a reference before using it
            in the promise parameter preview.

    gcc/testsuite/ChangeLog:

    2020-04-22  Iain Sandoe  <i...@sandoe.co.uk>

            PR c++/94682
            * g++.dg/coroutines/pr94682-preview-this.C: New test.

Reply via email to