This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Bug fix for template template arg unification
- To: Kriang Lerdsuwanakij <lerdsuwa at scf-fs dot usc dot edu>
- Subject: Re: [C++ PATCH] Bug fix for template template arg unification
- From: Jason Merrill <jason at redhat dot com>
- Date: 11 Aug 2000 18:51:43 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <Pine.GSO.4.21.0008081051180.1819-100000@aludra.usc.edu>
>>>>> Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> writes:
> The following patch fix the bug report #15 in GNATS.
> When unifying template template parameters, same_type_p was used
> to handle all cases, however it isn't design to work with
> TEMPLATE_DECL nodes. The patch below fixes that.
Thanks.
It seems to me that if the parameter is a template template parameter, we
shouldn't be using same_type_p anyway; we should move the existing test
into the type parm branch of the if.
That we were using same_type_p to handle TEMPLATE_TEMPLATE_PARMs in the
first place seems bogus, and comes from using the same TREE_CODE
(TEMPLATE_TEMPLATE_PARM) to refer to template template parms both with and
without args. Please change that; we should have a different code for
instantiations of ttp's.
Jason