(C++) linkage patch
Jason Merrill
jason@cygnus.com
Wed Mar 31 18:59:00 GMT 1999
O, what a tangled web we weave...
1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (start_function): Suppress normal linkage heuristics
for #pragma interface under MULTIPLE_SYMBOL_SPACES.
Index: decl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl.c,v
retrieving revision 1.325
diff -c -p -r1.325 decl.c
*** decl.c 1999/03/17 00:28:27 1.325
--- decl.c 1999/03/19 09:19:22
*************** start_function (declspecs, declarator, a
*** 13133,13138 ****
--- 13133,13152 ----
DECL_NOT_REALLY_EXTERN (decl1) = 0;
DECL_INTERFACE_KNOWN (decl1) = 1;
}
+ else if (interface_unknown && interface_only
+ && (! DECL_TEMPLATE_INSTANTIATION (decl1)
+ || flag_alt_external_templates))
+ {
+ /* If MULTIPLE_SYMBOL_SPACES is defined and we saw a #pragma
+ interface, we will have interface_only set but not
+ interface_known. In that case, we don't want to use the normal
+ heuristics because someone will supply a #pragma implementation
+ elsewhere, and deducing it here would produce a conflict. */
+ comdat_linkage (decl1);
+ DECL_EXTERNAL (decl1) = 0;
+ DECL_INTERFACE_KNOWN (decl1) = 1;
+ DECL_DEFER_OUTPUT (decl1) = 1;
+ }
else
{
/* This is a definition, not a reference.
More information about the Gcc-patches
mailing list