pt.c (lookup_template_function): Copy the template arguments...
authorMark Mitchell <mmitchell@usa.net>
Mon, 8 Dec 1997 06:41:17 +0000 (06:41 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 8 Dec 1997 06:41:17 +0000 (01:41 -0500)
* pt.c (lookup_template_function): Copy the template arguments,
not just the list containing them, to the permanent obstack.

From-SVN: r17006

gcc/cp/ChangeLog
gcc/cp/pt.c

index 8476d56..2b9a24f 100644 (file)
@@ -1,3 +1,8 @@
+Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
+
+       * pt.c (lookup_template_function): Copy the template arguments,
+       not just the list containing them, to the permanent obstack.
+
 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
        * except.c (expand_start_catch_block): suspend_momentary for the
index f9f5017..c35dc20 100644 (file)
@@ -1326,11 +1326,7 @@ lookup_template_function (fns, arglist)
     }
 
   if (arglist != NULL_TREE && !TREE_PERMANENT (arglist))
-    {
-      push_obstacks (&permanent_obstack, &permanent_obstack);
-      arglist = copy_list (arglist);
-      pop_obstacks ();
-    }
+    copy_to_permanent (arglist);
 
   return build_min (TEMPLATE_ID_EXPR,
                    TREE_TYPE (fns)