+1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
+
+ * class.c (finish_struct_1): Don't complain about non-copy
+ assignment ops in union members.
+
+ * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
+ (prepare_fresh_vtable): Likewise.
+ (finish_struct_1): Don't call import_export_class.
+ * decl2.c (finish_vtable_vardecl): Do import/export stuff.
+ (finish_prevtable_vardecl): Lose.
+ (finish_file): Don't call it.
+ * pt.c (instantiate_class_template): Likewise.
+
1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
* parse.y (condition): Convert VAR_DECL from reference to indirect
#endif
/* Set TREE_PUBLIC and TREE_EXTERN as appropriate. */
- import_export_vtable (decl, type, at_eof);
+ import_export_vtable (decl, type, 0);
decl = pushdecl_top_level (decl);
SET_IDENTIFIER_GLOBAL_VALUE (name, decl);
#endif
/* Set TREE_PUBLIC and TREE_EXTERN as appropriate. */
- import_export_vtable (new_decl, for_type, at_eof);
+ import_export_vtable (new_decl, for_type, 0);
if (TREE_VIA_VIRTUAL (binfo))
my_friendly_assert (binfo == binfo_member (BINFO_TYPE (binfo),
fie = "constructor";
else if (TYPE_NEEDS_DESTRUCTOR (type))
fie = "destructor";
- else if (TYPE_HAS_REAL_ASSIGNMENT (type))
- fie = "assignment operator";
+ else if (TYPE_HAS_COMPLEX_ASSIGN_REF (type))
+ fie = "copy assignment operator";
if (fie)
cp_error_at ("member `%#D' with %s not allowed in union", x,
fie);
if (max_has_virtual > 0)
TYPE_VIRTUAL_P (t) = 1;
- /* Do this here before we start messing with vtables so that we are ready
- for import_export_vtable. */
- if (at_eof)
- import_export_class (t);
-
if (flag_rtti && TYPE_VIRTUAL_P (t) && !pending_hard_virtuals)
modify_all_vtables (t, NULL_TREE, NULL_TREE);
}
}
-int
-finish_prevtable_vardecl (prev, vars)
+static int
+finish_vtable_vardecl (prev, vars)
tree prev, vars;
{
tree ctype = DECL_CONTEXT (vars);
import_export_class (ctype);
import_export_vtable (vars, ctype, 1);
- return 1;
-}
-
-static int
-finish_vtable_vardecl (prev, vars)
- tree prev, vars;
-{
+
if (write_virtuals >= 0
&& ! DECL_EXTERNAL (vars)
&& ((TREE_PUBLIC (vars) && ! DECL_WEAK (vars) && ! DECL_ONE_ONLY (vars))
pushdecl (vars);
#endif
- /* Walk to mark the inline functions we need, then output them so
- that we can pick up any other tdecls that those routines need. */
- walk_vtables ((void (*) PROTO ((tree, tree))) 0,
- finish_prevtable_vardecl);
-
for (vars = static_aggregates; vars; vars = TREE_CHAIN (vars))
if (! TREE_ASM_WRITTEN (TREE_VALUE (vars)))
rest_of_decl_compilation (TREE_VALUE (vars), 0, 1, 1);
CLASSTYPE_GOT_SEMICOLON (type) = 1;
repo_template_used (type);
- if (at_eof && TYPE_BINFO_VTABLE (type) != NULL_TREE)
- finish_prevtable_vardecl (NULL, TYPE_BINFO_VTABLE (type));
end:
TYPE_BEING_DEFINED (type) = 0;