diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-09-16 09:53:40 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2004-09-16 09:53:40 +0000 |
commit | c6a147ef48cbd9af4d734db8b2aec4fee26c7b15 (patch) | |
tree | 05f087296df6da2876dbac64a95198a03423740d /gcc/cp/search.c | |
parent | 6c25832171bad24acebb4d5420292e896c61f168 (diff) |
* 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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@87592 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r-- | gcc/cp/search.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c index f547e6c8ee7..c68fc3ced72 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. */ |