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
This commit is contained in:
parent
4099c493d6
commit
cdcb673e6e
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue