This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) linkage patch
- To: egcs-patches at cygnus dot com
- Subject: (C++) linkage patch
- From: Jason Merrill <jason at cygnus dot com>
- Date: Tue, 19 Jan 1999 11:14:38 -0800
Sometimes DECL_INITIAL would not have been set in import_export_vtable, so
the compiler would just set DECL_COMMON.
1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (finish_vtable_vardecl): Make vtables comdat here.
(import_export_vtable): Not here.
Index: decl2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl2.c,v
retrieving revision 1.172
diff -c -p -r1.172 decl2.c
*** decl2.c 1999/01/18 12:49:19 1.172
--- decl2.c 1999/01/19 19:13:29
*************** import_export_vtable (decl, type, final)
*** 2473,2482 ****
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
{
--- 2473,2478 ----
*************** finish_vtable_vardecl (prev, vars)
*** 2644,2649 ****
--- 2640,2649 ----
DECL_IGNORED_P (vars) = 1;
}
+
+ /* Always make vtables weak. */
+ if (flag_weak)
+ comdat_linkage (vars);
rest_of_decl_compilation (vars, NULL_PTR, 1, 1);