aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-01-12 14:18:13 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2004-01-12 13:18:13 +0000
commitc1e39976c9610d2fcce9cb959db1f113d6a0402d (patch)
tree9bed28685aff67769026ce197c982cd3996f0f5f /gcc
parent07d7d2f4d162b6afbca9f103f0af913e5d9956f9 (diff)
downloadgcc-c1e39976c9610d2fcce9cb959db1f113d6a0402d.zip
gcc-c1e39976c9610d2fcce9cb959db1f113d6a0402d.tar.gz
gcc-c1e39976c9610d2fcce9cb959db1f113d6a0402d.tar.bz2
pt.c (for_each_template_parm): Do not check for duplicates.
* pt.c (for_each_template_parm): Do not check for duplicates. (for_each_template_parm): Use walk_tree duplicate checking code. From-SVN: r75718
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c13
2 files changed, 6 insertions, 12 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2d100c8..d721909 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-12 Jan Hubicka <jh@suse.cz>
+
+ * pt.c (for_each_template_parm): Do not check for duplicates.
+ (for_each_template_parm): Use walk_tree duplicate checking code.
+
2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
PR c++/3478
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 040476c..473b6fe 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -4511,17 +4511,6 @@ for_each_template_parm_r (tree* tp, int* walk_subtrees, void* d)
struct pair_fn_data *pfd = (struct pair_fn_data *) d;
tree_fn_t fn = pfd->fn;
void *data = pfd->data;
- void **slot;
-
- /* If we have already visited this tree, there's no need to walk
- subtrees. Otherwise, add it to the visited table. */
- slot = htab_find_slot (pfd->visited, *tp, INSERT);
- if (*slot)
- {
- *walk_subtrees = 0;
- return NULL_TREE;
- }
- *slot = *tp;
if (TYPE_P (t)
&& for_each_template_parm (TYPE_CONTEXT (t), fn, data, pfd->visited))
@@ -4714,7 +4703,7 @@ for_each_template_parm (tree t, tree_fn_t fn, void* data, htab_t visited)
result = walk_tree (&t,
for_each_template_parm_r,
&pfd,
- NULL) != NULL_TREE;
+ pfd.visited) != NULL_TREE;
/* Clean up. */
if (!visited)