This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR c++/69098 (bogus errors with static data member template)
- From: Patrick Palka <patrick at parcs dot ath dot cx>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jason Merrill <jason at redhat dot com>, Patrick Palka <patrick at parcs dot ath dot cx>
- Date: Wed, 10 Feb 2016 14:24:39 -0500
- Subject: Re: [PATCH] Fix PR c++/69098 (bogus errors with static data member template)
- Authentication-results: sourceware.org; auth=none
- References: <1455131764-11282-1-git-send-email-patrick at parcs dot ath dot cx>
On Wed, Feb 10, 2016 at 2:16 PM, Patrick Palka <patrick@parcs.ath.cx> wrote:
> tsubst_qualified_id() is currently not prepared to handle a SCOPED_REF
> whose RHS is a variable template. r226642 made this deficiency more
> obvious by marking all variable templates as dependent (thus forcing
> them to be wrapped in a SCOPED_REF) but before that it was also possible
> to trigger a bogus error if the scope of the variable template was
> dependent (e.g. foo2 in the test case 69098-2.C fails to compile even
> before r226642, whereas foo1 fails to compile only after r226642).
>
> Further, check_template_keyword() is currently not prepared to handle
> variable templates as well. And again r226642 helped to expose this
> issue but it was already possible to trigger before that (e.g. foo4
> always failed to compile whereas foo3 only fails after r226642).
Err, sorry, disregard this last sentence, including the parenthetical.
Both tsubst_qualified_id() and check_template_keyword() must be fixed
in order for foo2 to compile. For foo1 to compile, only
tsubst_qualified_id() must be fixed. foo3 and foo4 are just examples
for which an earlier iteration of this patch caused an ICE.