+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
}
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
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
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
#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
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
/* 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);
- }
- }
}
\f
/* DEPTH-FIRST SEARCH ROUTINES. */