aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1999-07-09 08:44:37 -0400
committerJason Merrill <jason@gcc.gnu.org>1999-07-09 08:44:37 -0400
commit1d02ac8371b1d3b31ed029c29fa23fadeca48787 (patch)
treece533478692fb6b5bbf3b4376582f0ed83cc0394 /gcc/cp/semantics.c
parent6f1b4c42790b1a8083ae217facb58eb3f0cfa819 (diff)
downloadgcc-1d02ac8371b1d3b31ed029c29fa23fadeca48787.zip
gcc-1d02ac8371b1d3b31ed029c29fa23fadeca48787.tar.gz
gcc-1d02ac8371b1d3b31ed029c29fa23fadeca48787.tar.bz2
decl2.c (reparse_absdcl_as_casts): Don't warn about old-style casts in system headers or extern "C" blocks.
* decl2.c (reparse_absdcl_as_casts): Don't warn about old-style casts in system headers or extern "C" blocks. * decl2.c (write_virtuals): Deleted declaration. * cp-tree.h (write_virtuals): Deleted extern declaration. * class.c (finish_struct_1): Removed #if 0'd code that mentions write_virtuals. * semantics.c (begin_class_definition): Rewrite code to not depend on write_virtuals. * lex.c (cp_pragma_interface): New function. (cp_pragma_implementation): Likewise. (handle_cp_pragma): Call them. From-SVN: r28045
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 1659ec8..059375b 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -1329,16 +1329,12 @@ begin_class_definition (t)
SET_CLASSTYPE_INTERFACE_UNKNOWN_X
(t, interface_unknown);
}
-
- /* Record how to set the access of this class's
- virtual functions. If write_virtuals == 3, then
- inline virtuals are ``extern inline''. */
- if (write_virtuals == 3)
- needs_writing = ! CLASSTYPE_INTERFACE_ONLY (t)
- && CLASSTYPE_INTERFACE_KNOWN (t);
- else
- needs_writing = 1;
- CLASSTYPE_VTABLE_NEEDS_WRITING (t) = needs_writing;
+
+ /* Only leave this bit clear if we know this
+ class is part of an interface-only specification. */
+ if (! CLASSTYPE_INTERFACE_KNOWN (t)
+ || ! CLASSTYPE_INTERFACE_ONLY (t))
+ CLASSTYPE_VTABLE_NEEDS_WRITING (t) = 1;
}
#if 0
tmp = TYPE_IDENTIFIER ($<ttype>0);