aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/search.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@gcc.gnu.org>2004-09-16 09:53:40 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2004-09-16 09:53:40 +0000
commit585b44d301a56eb7c2e40e840c6c9868f6b92d46 (patch)
tree05f087296df6da2876dbac64a95198a03423740d /gcc/cp/search.c
parent45f1796923b1b10a3bb13e79f4905cd7763d969a (diff)
downloadgcc-585b44d301a56eb7c2e40e840c6c9868f6b92d46.zip
gcc-585b44d301a56eb7c2e40e840c6c9868f6b92d46.tar.gz
gcc-585b44d301a56eb7c2e40e840c6c9868f6b92d46.tar.bz2
cp-tree.h (struct lang_type_class): Make pure_virtuals a VEC(tree).
* cp-tree.h (struct lang_type_class): Make pure_virtuals a VEC(tree). (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update comments. * call.c (build_new_method_call): Don't confirm a pure virtual is in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning. * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree). (fixup_inline_methods, finish_struct): Likewise. * decl.c (finish_method): Likewise. * search.c (dfs_get_pure_virtuals, get_pure_virtuals): CLASSTYPE_PURE_VIRTUALS is a VEC(tree). * typeck2.c (abstract_virtuals_error): Likewise. Truncate the vector to avoid repeating the list in error messages. From-SVN: r87592
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r--gcc/cp/search.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index f547e6c..c68fc3c 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -1875,9 +1875,8 @@ dfs_get_pure_virtuals (tree binfo, void *data)
virtuals;
virtuals = TREE_CHAIN (virtuals))
if (DECL_PURE_VIRTUAL_P (BV_FN (virtuals)))
- CLASSTYPE_PURE_VIRTUALS (type)
- = tree_cons (NULL_TREE, BV_FN (virtuals),
- CLASSTYPE_PURE_VIRTUALS (type));
+ VEC_safe_push (tree, CLASSTYPE_PURE_VIRTUALS (type),
+ BV_FN (virtuals));
}
BINFO_MARKED (binfo) = 1;
@@ -1892,7 +1891,7 @@ get_pure_virtuals (tree type)
{
/* Clear the CLASSTYPE_PURE_VIRTUALS list; whatever is already there
is going to be overridden. */
- CLASSTYPE_PURE_VIRTUALS (type) = NULL_TREE;
+ CLASSTYPE_PURE_VIRTUALS (type) = NULL;
/* Now, run through all the bases which are not primary bases, and
collect the pure virtual functions. We look at the vtable in
each class to determine what pure virtual functions are present.
@@ -1901,9 +1900,6 @@ get_pure_virtuals (tree type)
pure virtuals in the base class. */
dfs_walk (TYPE_BINFO (type), dfs_get_pure_virtuals, unmarkedp, type);
dfs_walk (TYPE_BINFO (type), dfs_unmark, markedp, type);
-
- /* Put the pure virtuals in dfs order. */
- CLASSTYPE_PURE_VIRTUALS (type) = nreverse (CLASSTYPE_PURE_VIRTUALS (type));
}
/* DEPTH-FIRST SEARCH ROUTINES. */