diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 143ce6c04bc..2b3a14f8c54 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-01-19 Jason Merrill + + * decl2.c (finish_vtable_vardecl): Make vtables comdat here. + (import_export_vtable): Not here. + 1999-01-18 Jason Merrill * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 9ca09cb985b..303364453a7 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2473,10 +2473,6 @@ import_export_vtable (decl, type, final) TREE_PUBLIC (decl) = 1; DECL_EXTERNAL (decl) = ! CLASSTYPE_VTABLE_NEEDS_WRITING (type); DECL_INTERFACE_KNOWN (decl) = 1; - - /* Always make vtables weak. */ - if (flag_weak) - comdat_linkage (decl); } else { @@ -2645,6 +2641,10 @@ finish_vtable_vardecl (prev, vars) DECL_IGNORED_P (vars) = 1; } + /* Always make vtables weak. */ + if (flag_weak) + comdat_linkage (vars); + rest_of_decl_compilation (vars, NULL_PTR, 1, 1); if (flag_vtable_gc)