This is the mail archive of the
mailing list for the GCC project.
Re: [C++ Patch] PR 61088
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Jason Merrill <jason at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 22 May 2014 20:26:15 +0200
- Subject: Re: [C++ Patch] PR 61088
- Authentication-results: sourceware.org; auth=none
- References: <537DB4F9 dot 2060605 at oracle dot com> <537E3E5A dot 10601 at redhat dot com>
On 05/22/2014 08:13 PM, Jason Merrill wrote:
It would be definitely wrong, but it's just that I did something wrong
with the mailer, it shows Ok on my shell, under the a. Look at the
column, 9, which is fine.
On 05/22/2014 04:27 AM, Paolo Carlini wrote:
lambda-ice7.C:8:9: error: cannot capture by value âaâ of incomplete type
All the carets in your mail are in the first column; is this one in
the right place for you?
Let's not print out the expression, we've been moving away from that.
Maybe "capture by value of incomplete type 'A'".
Good. I wanted to ask about that. Also, by copy instead of by value,
right? Because the Standard always talks about copy (likewise clang).
Right, thanks. I'm probably going to add it, at some point. Me, I was
looking for something not using C++14 initializers, I think in that case
is more difficult!?!
OK with that change.
4- Finally, something I noticed while working on add_capture: right
above the new check there is:
type = lambda_capture_field_type (initializer, explicit_init_p);
type = build_reference_type (type);
if (!real_lvalue_p (initializer))
error ("cannot capture %qE by reference", initializer);
now, interestingly, nothing in the testsuite exercises this error.
And, so far, I failed to create a testcase for it. The Standard too
doesn't seem to me so clear about that. Ideas?!?