This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCHes to dependent template-id parsing
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 6 Jul 2017 14:26:18 -0400
- Subject: Re: C++ PATCHes to dependent template-id parsing
- Authentication-results: sourceware.org; auth=none
- References: <CADzB+2nH2oFtMVpnRA2Y4TZLAKc31qhOfF14+548yzmoiOa0Mg@mail.gmail.com>
On Wed, Jun 28, 2017 at 3:38 PM, Jason Merrill <jason@redhat.com> wrote:
> 81204 is a regression whereby previously we would accidentally get the
> parsing of res.template set<I> right because when we did the lookup in
> the surrounding context, we found the function template and then
> ignored it. This patch partially reverts the handling of .template to
> how it was in GCC 6.
>
> But this bug is really a special case of 54769; we should be treating
> that name as dependent and not doing a lookup in the enclosing context
> at all. As I noted in discussion of 55576, we need to pass
> template_keyword_p into nested_name_specifier_opt. So this patch does
> that, and also adjusts cp_parser_template_name to consider object
> scope.
I'm reverting the 81204 patch for both 7 and 8, as it is wrong under
DR 141 and the 54769 patch is better.
Jason