aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorManfred Hollstein <manfred@gcc.gnu.org>1998-03-15 03:28:04 +0000
committerManfred Hollstein <manfred@gcc.gnu.org>1998-03-15 03:28:04 +0000
commitcdcb673e6e6c4b7534fb5b98efda5f8079de8905 (patch)
tree7668689f022949812c2de9fa4373a0a40d3de081 /gcc
parent4099c493d62a407853b5138cbddc8abcbec6270f (diff)
downloadgcc-cdcb673e6e6c4b7534fb5b98efda5f8079de8905.zip
gcc-cdcb673e6e6c4b7534fb5b98efda5f8079de8905.tar.gz
gcc-cdcb673e6e6c4b7534fb5b98efda5f8079de8905.tar.bz2
cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
a * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider. (DECL_NEEDS_FINAL_OVERRIDER_P): New macro. * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P. * decl.c (duplicate_decls): Propagate it. * typeck2.c (abstract_virtuals_error): Use two loops to emit abstract virtual functions and virtual functions which need a final overrider separately. From-SVN: r18587
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/cp-tree.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 93a2527..1cee86b 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -969,7 +969,8 @@ struct lang_decl_flags
unsigned declared_inline : 1;
unsigned not_really_extern : 1;
unsigned comdat : 1;
- unsigned dummy : 4;
+ unsigned needs_final_overrider : 1;
+ unsigned dummy : 3;
tree access;
tree context;
@@ -1076,6 +1077,10 @@ struct lang_decl
exists as part of an abstract class's interface. */
#define DECL_ABSTRACT_VIRTUAL_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.abstract_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)
+
/* Nonzero if allocated on permanent_obstack. */
#define LANG_DECL_PERMANENT(LANGDECL) ((LANGDECL)->decl_flags.permanent_attr)