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/parse.y | |
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/parse.y')
-rw-r--r-- | gcc/cp/parse.y | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index 5d0ff07..183def8 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -854,40 +854,10 @@ return_init: base_init: ':' .set_base_init member_init_list { - tree member_init_list = NULL_TREE; - tree base_init_list = NULL_TREE; - tree init; - tree next; - int seen_member_init_p; - if ($3.new_type_flag == 0) error ("no base or member initializers given following ':'"); - - seen_member_init_p = 0; - for (init = $3.t; init; init = next) - { - next = TREE_CHAIN (init); - if (TREE_CODE (TREE_PURPOSE (init)) == FIELD_DECL) - { - TREE_CHAIN (init) = member_init_list; - member_init_list = init; - seen_member_init_p = 1; - } - else - { - if (warn_reorder && seen_member_init_p) - { - cp_warning ("base initializer for `%T'", - TREE_PURPOSE (init)); - warning (" will be re-ordered to precede member initializations"); - } - - TREE_CHAIN (init) = base_init_list; - base_init_list = init; - } - } - setup_vtbl_ptr (member_init_list, base_init_list); + finish_mem_initializers ($3.t); } ; |