diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-06-16 15:35:10 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-06-16 15:35:10 +0000 |
commit | bf3428d0b60d92b52699e4def461ad33f5ae0ce6 (patch) | |
tree | 20ff6c673647b5b53fc1f7c318e25ca02c88d2d7 /gcc/cp/tree.c | |
parent | 22c40c28b39c88652b3f25a51dfbf6b044f157d6 (diff) | |
download | gcc-bf3428d0b60d92b52699e4def461ad33f5ae0ce6.zip gcc-bf3428d0b60d92b52699e4def461ad33f5ae0ce6.tar.gz gcc-bf3428d0b60d92b52699e4def461ad33f5ae0ce6.tar.bz2 |
cp-tree.h (finish_mem_initializers): Declare.
* cp-tree.h (finish_mem_initializers): Declare.
(count_trees): Likewise.
* parse.y (base_init): Use finish_mem_initializers.
* semantics.c (finish_mem_initializers): New function.
* tree.c (count_trees_r): Prototype. Use DATA parameter to store
the number of trees.
(n_trees): Remove.
(count_trees): Don't use it.
From-SVN: r34574
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index c890c37..cdf0c13 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -47,6 +47,7 @@ static tree mark_local_for_remap_r PARAMS ((tree *, int *, void *)); static tree cp_unsave_r PARAMS ((tree *, int *, void *)); static void cp_unsave PARAMS ((tree *)); static tree build_target_expr PARAMS ((tree, tree)); +static tree count_trees_r PARAMS ((tree *, int *, void *)); /* If REF is an lvalue, returns the kind of lvalue that REF is. Otherwise, returns clk_none. If TREAT_CLASS_RVALUES_AS_LVALUES is @@ -1396,15 +1397,15 @@ walk_tree (tp, func, data) #undef WALK_SUBTREE } -int n_trees; +/* Called from count_trees via walk_tree. */ static tree count_trees_r (tp, walk_subtrees, data) tree *tp ATTRIBUTE_UNUSED; int *walk_subtrees ATTRIBUTE_UNUSED; - void *data ATTRIBUTE_UNUSED; + void *data; { - ++n_trees; + ++ *((int*) data); return NULL_TREE; } @@ -1415,8 +1416,8 @@ int count_trees (t) tree t; { - n_trees = 0; - walk_tree (&t, count_trees_r, NULL); + int n_trees = 0; + walk_tree (&t, count_trees_r, &n_trees); return n_trees; } |