This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [C++ PATCH] Bug fix for template template arg unification


>>>>> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]