Commit 88e1b92a by Jason Merrill Committed by Jason Merrill

pt.c (tsubst_decl, [...]): Fix test for TYPE_DECLs for which we don't need to…

pt.c (tsubst_decl, [...]): Fix test for TYPE_DECLs for which we don't need to look for instantiations.

        * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
        for which we don't need to look for instantiations.

From-SVN: r34633
parent f433539a
2000-06-20 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
for which we don't need to look for instantiations.
2000-06-21 Nathan Sidwell <nathan@codesourcery.com> 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (program): Always call finish_translation_unit. * parse.y (program): Always call finish_translation_unit.
......
...@@ -5873,20 +5873,13 @@ tsubst_decl (t, args, type, in_decl) ...@@ -5873,20 +5873,13 @@ tsubst_decl (t, args, type, in_decl)
break; break;
case TYPE_DECL: case TYPE_DECL:
if (DECL_IMPLICIT_TYPEDEF_P (t)) if (TREE_CODE (type) == TEMPLATE_TEMPLATE_PARM
|| t == TYPE_MAIN_DECL (TREE_TYPE (t)))
{ {
/* For an implicit typedef, we just want the implicit /* If this is the canonical decl, we don't have to mess with
typedef for the tsubst'd type. We've already got the instantiations, and often we can't (for typename, template
tsubst'd type, as TYPE, so we just need it's associated type parms and such). Note that TYPE_NAME is not correct for
declaration. */ the above test if we've copied the type for a typedef. */
r = TYPE_NAME (type);
break;
}
else if (TREE_CODE (type) == TEMPLATE_TYPE_PARM
|| TREE_CODE (type) == TEMPLATE_TEMPLATE_PARM)
{
/* For a template type parameter, we don't have to do
anything special. */
r = TYPE_NAME (type); r = TYPE_NAME (type);
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment