diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2001-12-04 09:51:18 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2001-12-04 09:51:18 +0000 |
commit | 9471d3e291b8fd367864de882bf04742cba47f44 (patch) | |
tree | ee8b9f6a6d753d105c40439fa2f1e288311f5eef /gcc | |
parent | 713ccd0c6c230f7680c9d4c9502f5daab7002a26 (diff) | |
download | gcc-9471d3e291b8fd367864de882bf04742cba47f44.zip gcc-9471d3e291b8fd367864de882bf04742cba47f44.tar.gz gcc-9471d3e291b8fd367864de882bf04742cba47f44.tar.bz2 |
pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
cp:
* pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
From-SVN: r47604
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d869b0d..a8118ef 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 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 * init.c (sort_base_init): Allow binfos to be directly specified. * method.c (do_build_copy_constructor): Explicitly convert to the diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 8273e16..f383127 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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: |