This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch PING] [C++ Patch] PR 82235 (Copy ctor is not found for copying array of an object when it's marked explicit)
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Jason Merrill <jason at redhat dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Cc: nathan at acm dot org
- Date: Thu, 14 Dec 2017 12:04:20 +0100
- Subject: Re: [C++ Patch PING] [C++ Patch] PR 82235 (Copy ctor is not found for copying array of an object when it's marked explicit)
- Authentication-results: sourceware.org; auth=none
- References: <71bbf73e-f7c5-3d0d-cc33-ef2921ea8e55@oracle.com> <74a82c72-612d-6784-ad70-1758f214f082@oracle.com> <62fc6ded-a3a4-2f2d-ffb1-11ed8da6d852@redhat.com>
Hi Jason,
On 13/12/2017 23:27, Jason Merrill wrote:
These two don't match:
+ When initializing a temporary to be bound to the first
+ parameter of a constructor where the parameter is of type
+/* Return true if current_function_decl is a constructor
+ and its first argument is a reference type and it is
The language is talking about the function being called, and
ref_first_parm_of_constructor is looking at the function we're
currently in.
Indeed. Thanks Jason for the feedback.
I was going to send an improved patch, among other things using
CP_DECL_CONTEXT, when I noticed that this issue seems essentially a
special case of *your* core/899, right? For 899 we already have some
infrastructure in place and I believe we only have to figure out why we
don't handle correctly *arrays*, because otherwise we already accept a
similar testcase involving a plain 'Foo m' member. Please let me know,
otherwise I'm going to work in this direction!
Thanks again,
Paolo.