diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-04-18 20:21:39 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-04-18 20:21:39 +0000 |
commit | 0d9eb3ba2922a07d68c27170de0195f5b96b4b0c (patch) | |
tree | fed08624d1d24855eb4b01f654e9f1ed84672588 /gcc/cp/class.c | |
parent | 616ce8db9156c22bac0d5d43366be58073ef0368 (diff) | |
download | gcc-0d9eb3ba2922a07d68c27170de0195f5b96b4b0c.zip gcc-0d9eb3ba2922a07d68c27170de0195f5b96b4b0c.tar.gz gcc-0d9eb3ba2922a07d68c27170de0195f5b96b4b0c.tar.bz2 |
cp-tree.h (lang_decl_flags): Remove const_memfunc and volatile_memfunc.
* cp-tree.h (lang_decl_flags): Remove const_memfunc and
volatile_memfunc. Add destructor_attr. Adjust dummy.
(DECL_DESTRUCTOR_P): Use destructor_attr.
(DECL_CONST_MEMFUNC_P): Reimplement.
(DECL_VOLATILE_MEMFUNC_P): Remove.
* class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
(overrides): Use DECL_DESTRUCTOR_P.
(check_for_override): Likewise.
* decl.c (start_function): Likewise.
* decl2.c (grokfclassfn): Likewise.
(check_classfn): Likewise.
(grok_function_init): Likewise.
From-SVN: r33235
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index a850a27..b5d3f3e 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -2155,7 +2155,7 @@ finish_struct_methods (t) /* Clear out this flag. */ DECL_IN_AGGR_P (fn_fields) = 0; - if (TYPE_HAS_DESTRUCTOR (t) && !TREE_VEC_ELT (method_vec, 1)) + if (TYPE_HAS_DESTRUCTOR (t) && !CLASSTYPE_DESTRUCTORS (t)) /* We thought there was a destructor, but there wasn't. Some parse errors cause this anomalous situation. */ TYPE_HAS_DESTRUCTOR (t) = 0; @@ -2285,11 +2285,9 @@ overrides (fndecl, base_fndecl) tree fndecl, base_fndecl; { /* Destructors have special names. */ - if (DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (base_fndecl)) - && DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (fndecl))) + if (DECL_DESTRUCTOR_P (base_fndecl) && DECL_DESTRUCTOR_P (fndecl)) return 1; - if (DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (base_fndecl)) - || DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (fndecl))) + if (DECL_DESTRUCTOR_P (base_fndecl) || DECL_DESTRUCTOR_P (fndecl)) return 0; if (DECL_NAME (fndecl) == DECL_NAME (base_fndecl)) { @@ -2744,8 +2742,7 @@ check_for_override (decl, ctype) if (TYPE_POLYMORPHIC_P (BINFO_TYPE (base_binfo))) { tree tmp = get_matching_virtual - (base_binfo, decl, - DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (decl))); + (base_binfo, decl, DECL_DESTRUCTOR_P (decl)); if (tmp && !found_overriden_fn) { |