cp-tree.h (struct lang_decl_flags): Remove needs_final_overrider.

* cp-tree.h (struct lang_decl_flags): Remove
	needs_final_overrider.
	(DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
	* decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
	* class.c (finish_struct_bits): Correct comment about
	CLASSTYPE_PURE_VIRTUALS.
	* search.c (get_pure_virtuals): Remove useless loop.

From-SVN: r87541
This commit is contained in:
Nathan Sidwell 2004-09-15 09:43:52 +00:00 committed by Nathan Sidwell
parent a45f71f537
commit 16ae29f1e6
5 changed files with 15 additions and 26 deletions

View File

@ -1,3 +1,13 @@
2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (struct lang_decl_flags): Remove
needs_final_overrider.
(DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
* decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
* class.c (finish_struct_bits): Correct comment about
CLASSTYPE_PURE_VIRTUALS.
* search.c (get_pure_virtuals): Remove useless loop.
2004-09-14 Mark Mitchell <mark@codesourcery.com>
PR c++/17324

View File

@ -1439,8 +1439,8 @@ finish_struct_bits (tree t)
}
if (BINFO_N_BASE_BINFOS (TYPE_BINFO (t)) && TYPE_POLYMORPHIC_P (t))
/* For a class w/o baseclasses, `finish_struct' has set
CLASS_TYPE_ABSTRACT_VIRTUALS correctly (by definition).
/* For a class w/o baseclasses, 'finish_struct' has set
CLASSTYPE_PURE_VIRTUALS correctly (by definition).
Similarly for a class whose base classes do not have vtables.
When neither of these is true, we might have removed abstract
virtuals (by providing a definition), added some (by declaring
@ -1448,7 +1448,7 @@ finish_struct_bits (tree t)
recalculate what's really an abstract virtual at this point (by
looking in the vtables). */
get_pure_virtuals (t);
/* If this type has a copy constructor or a destructor, force its
mode to be BLKmode, and force its TREE_ADDRESSABLE bit to be
nonzero. This will cause it to be passed by invisible reference

View File

@ -1522,16 +1522,15 @@ struct lang_decl_flags GTY(())
unsigned use_template : 2;
unsigned nonconverting : 1;
unsigned not_really_extern : 1;
unsigned needs_final_overrider : 1;
unsigned initialized_in_class : 1;
unsigned assignment_operator_p : 1;
unsigned u1sel : 1;
unsigned u2sel : 1;
unsigned can_be_full : 1;
unsigned this_thunk_p : 1;
unsigned repo_available_p : 1;
unsigned dummy : 3;
unsigned dummy : 4;
union lang_decl_u {
/* In a FUNCTION_DECL for which DECL_THUNK_P holds, this is
@ -1883,11 +1882,6 @@ struct lang_decl GTY(())
#define DECL_PURE_VIRTUAL_P(NODE) \
(DECL_LANG_SPECIFIC (NODE)->decl_flags.pure_virtual)
/* Nonzero for FUNCTION_DECL means that this member function
must be overridden by derived classes. */
#define DECL_NEEDS_FINAL_OVERRIDER_P(NODE) \
(DECL_LANG_SPECIFIC (NODE)->decl_flags.needs_final_overrider)
/* True (in a FUNCTION_DECL) if NODE is a virtual function that is an
invalid overrider for a function from a base class. Once we have
complained about an invalid overrider we avoid complaining about it

View File

@ -1582,7 +1582,6 @@ duplicate_decls (tree newdecl, tree olddecl)
DECL_STATIC_DESTRUCTOR (newdecl) |= DECL_STATIC_DESTRUCTOR (olddecl);
DECL_PURE_VIRTUAL_P (newdecl) |= DECL_PURE_VIRTUAL_P (olddecl);
DECL_VIRTUAL_P (newdecl) |= DECL_VIRTUAL_P (olddecl);
DECL_NEEDS_FINAL_OVERRIDER_P (newdecl) |= DECL_NEEDS_FINAL_OVERRIDER_P (olddecl);
DECL_THIS_STATIC (newdecl) |= DECL_THIS_STATIC (olddecl);
if (DECL_OVERLOADED_OPERATOR_P (olddecl) != ERROR_MARK)
SET_OVERLOADED_OPERATOR_CODE

View File

@ -1908,20 +1908,6 @@ get_pure_virtuals (tree type)
/* Put the pure virtuals in dfs order. */
CLASSTYPE_PURE_VIRTUALS (type) = nreverse (CLASSTYPE_PURE_VIRTUALS (type));
for (vbases = CLASSTYPE_VBASECLASSES (type), ix = 0;
VEC_iterate (tree, vbases, ix, binfo); ix++)
{
tree virtuals;
for (virtuals = BINFO_VIRTUALS (binfo); virtuals;
virtuals = TREE_CHAIN (virtuals))
{
tree base_fndecl = BV_FN (virtuals);
if (DECL_NEEDS_FINAL_OVERRIDER_P (base_fndecl))
error ("`%#D' needs a final overrider", base_fndecl);
}
}
}
/* DEPTH-FIRST SEARCH ROUTINES. */