From: Nathan Sidwell <nathan@acm.org>
To: Iain Sandoe <iain@sandoe.co.uk>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v2] coroutines: Implicitly movable objects should use move CTORs for co_return.
Date: Thu, 14 May 2020 11:13:26 -0400 [thread overview]
Message-ID: <dcd1a72a-ce8c-2e80-df88-fa6f870c4e08@acm.org> (raw)
In-Reply-To: <A3A236CD-37B3-4008-A303-45A7F7D2E343@sandoe.co.uk>
On 5/14/20 9:04 AM, Iain Sandoe wrote:
> Hi
>
> thanks for the review and pointers ...
>
> Nathan Sidwell <nathan@acm.org> wrote:
>
>> On 5/13/20 9:26 AM, Iain Sandoe wrote:
>>> Nathan Sidwell <nathan@acm.org> wrote:
>>>> On 5/13/20 6:59 AM, Iain Sandoe wrote:
>>>>>
>
>>> This is the equivalent of finish_return_stmt () in the parser, it knows nothing of the eventual morphing of local vars (or parms) into frame references.
>>> So I only need to handle what can be returned by "expr = cp_parser_expression (parser);”
>>> dependent expressions are dealt with above, with an early return with “type_unknown_node”.
>
> Unfortunately, the code in finish_return_stmt / and check_return_expr is too retval-centric to be
> re-used in this context. However, I have taken from it in determining a sequence of operations,
> and in the use of treat_lvalue_as_rvalue_p() - with the additional criterion that the object must
> not be volatile (check_return_expr checks that in a different predicate, that’s not usable here).
>
> tested on x86_64-darwin so far,
> does this now look OK for master (after checking on Linux too)?
> and for 10.2 after some bake time on master?
>
> thanks
> Iain
>
> =====
>
> This is a case where the standard contains conflicting information.
> after discussion between implementators, the accepted intent is of
> [class.copy.elision]. This amends the handling of co_return statements
> to follow that.
>
> gcc/cp/ChangeLog:
>
> 2020-05-14 Iain Sandoe <iain@sandoe.co.uk>
>
> * coroutines.cc (finish_co_return_stmt): Implement rules
> from [class.copy.elision] /3.
Yeah, this is better, ok for master and 10.2 (when you're ready)
nathan
--
Nathan Sidwell
prev parent reply other threads:[~2020-05-14 15:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 10:59 [PATCH] " Iain Sandoe
2020-05-13 13:17 ` Nathan Sidwell
2020-05-13 13:26 ` Iain Sandoe
2020-05-13 15:10 ` Nathan Sidwell
2020-05-14 13:04 ` [PATCH v2] " Iain Sandoe
2020-05-14 15:13 ` Nathan Sidwell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dcd1a72a-ce8c-2e80-df88-fa6f870c4e08@acm.org \
--to=nathan@acm.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=iain@sandoe.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).