]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
authorNathan Sidwell <nathan@codesourcery.com>
Tue, 4 Dec 2001 09:51:18 +0000 (09:51 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 4 Dec 2001 09:51:18 +0000 (09:51 +0000)
cp:
* pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.

From-SVN: r47604

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

index d869b0d51ba4e6980e684aca8ce73894c419ac14..a8118ef9b593cea4fc84e3859d52433c37315aeb 100644 (file)
@@ -1,3 +1,7 @@
+2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
+
 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR g++/164
index 8273e168d1c31cc45f12a8e2fdfbfebd135af205..f383127edd96bfe407cd21b17229a7b7c9fae7c9 100644 (file)
@@ -2000,17 +2000,19 @@ end_template_parm_list (parms)
      tree parms;
 {
   int nparms;
-  tree parm;
+  tree parm, next;
   tree saved_parmlist = make_tree_vec (list_length (parms));
 
   current_template_parms
     = tree_cons (size_int (processing_template_decl),
                 saved_parmlist, current_template_parms);
 
-  for (parm = parms, nparms = 0; 
-       parm; 
-       parm = TREE_CHAIN (parm), nparms++)
-    TREE_VEC_ELT (saved_parmlist, nparms) = parm;
+  for (parm = parms, nparms = 0; parm; parm = next, nparms++)
+    {
+      next = TREE_CHAIN (parm);
+      TREE_VEC_ELT (saved_parmlist, nparms) = parm;
+      TREE_CHAIN (parm) = NULL_TREE;
+    }
 
   --processing_template_parmlist;
 
@@ -9188,7 +9190,7 @@ get_bindings_overload (fn, decl, explicit_args)
 
 /* Return the innermost template arguments that, when applied to a
    template specialization whose innermost template parameters are
-   TPARMS, and whose specialization arguments are ARGS, yield the
+   TPARMS, and whose specialization arguments are PARMS, yield the
    ARGS.  
 
    For example, suppose we have: