]> gcc.gnu.org Git - gcc.git/commitdiff
cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
authorManfred Hollstein <manfred@gcc.gnu.org>
Sun, 15 Mar 1998 03:28:04 +0000 (03:28 +0000)
committerManfred Hollstein <manfred@gcc.gnu.org>
Sun, 15 Mar 1998 03:28:04 +0000 (03:28 +0000)
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

gcc/cp/cp-tree.h

index 93a2527a31405c3bcad83636b4c42cb91b8f7341..1cee86b813ff73586208295fbe0369dfd2fa83bb 100644 (file)
@@ -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)
 
This page took 0.064032 seconds and 5 git commands to generate.