This is the mail archive of the
mailing list for the GCC project.
Re: [C++ PATCH] Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.
- From: Jason Merrill <jason at redhat dot com>
- To: Adam Butcher <adam at jessamine dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org, Volker Reichelt <reichelt at gcc dot gnu dot org>
- Date: Fri, 08 Nov 2013 13:50:53 -0500
- Subject: Re: [C++ PATCH] Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.
- Authentication-results: sourceware.org; auth=none
- References: <1383212824-5493-1-git-send-email-adam at jessamine dot co dot uk> <1383212824-5493-2-git-send-email-adam at jessamine dot co dot uk>
On 10/31/2013 05:47 AM, Adam Butcher wrote:
+ become_template = true;
+ push_deferring_access_checks (dk_deferred);
Why is this call here? I don't see anything in the rest of the function
that would trigger an access check, or a matching pop.
+ /* Create a distinct parameter pack type from the current parm and add it
+ to the replacement args to tsubst below into the generic function
+ parameter. */
+ tree t = copy_type (TREE_TYPE (TREE_VALUE (TREE_VEC_ELT (current, i))));
+ TYPE_STUB_DECL (t) = TYPE_NAME (t) = TEMPLATE_TYPE_DECL (t);
Is this changing anything? I'm not sure if we need to copy the decl or
if we can just reuse it, but either way we need to set the type of
TEMPLATE_TYPE_DECL (t) to t.
+ SET_TYPE_STRUCTURAL_EQUALITY (t);
TYPE_CANONICAL (t) = canonical_type_parameter (t);