diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-09-15 09:43:52 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-09-15 09:43:52 +0000 |
commit | 16ae29f1e617a0d0cc43d59b3082faf54bc436bb (patch) | |
tree | 1082845093d41243e0a6dc854bbb9503253f2fe1 /gcc/cp | |
parent | a45f71f53768d5be6e5dac1906a3bd2bee19e38b (diff) | |
download | gcc-16ae29f1e617a0d0cc43d59b3082faf54bc436bb.zip gcc-16ae29f1e617a0d0cc43d59b3082faf54bc436bb.tar.gz gcc-16ae29f1e617a0d0cc43d59b3082faf54bc436bb.tar.bz2 |
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
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cp/class.c | 6 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 10 | ||||
-rw-r--r-- | gcc/cp/decl.c | 1 | ||||
-rw-r--r-- | gcc/cp/search.c | 14 |
5 files changed, 15 insertions, 26 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e623148..a2bdd49 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 999551b..d31295a 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -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 diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index aa25658c..5d788af 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -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 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 97b5a1a..6128598 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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 diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 906491e..99a9453 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -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. */ |