method.c (implicitly_declare_fn): Set linkage of generated functions.
authorMark Mitchell <mark@codesourcery.com>
Sun, 4 Jul 2004 19:41:32 +0000 (19:41 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 4 Jul 2004 19:41:32 +0000 (19:41 +0000)
* method.c (implicitly_declare_fn): Set linkage of generated
functions.

From-SVN: r84092

gcc/cp/ChangeLog
gcc/cp/method.c

index 4703ed85be26e641c7a0226bdcea53cb2db1a37b..a15f1528808c858765b1d6886039648d548565a3 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-04  Mark Mitchell  <mark@codesourcery.com>
+
+       * method.c (implicitly_declare_fn): Set linkage of generated
+       functions.
+
 2004-07-04  Richard Henderson  <rth@redhat.com>
 
        * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
index 8745dcec78afec05a6f2aefc04a5561d638ed0a3..b7abe969b6cff57e0f27bfeb7988da3dfdfc7603 100644 (file)
@@ -1018,6 +1018,7 @@ implicitly_declare_fn (special_function_kind kind, tree type, bool const_p)
   grokclassfn (type, fn, kind == sfk_destructor ? DTOR_FLAG : NO_SPECIAL,
               TYPE_UNQUALIFIED);
   grok_special_member_properties (fn);
+  TREE_PUBLIC (fn) = !decl_function_context (TYPE_MAIN_DECL (type));
   cp_finish_decl (fn, /*init=*/NULL_TREE, /*asmspec_tree=*/NULL_TREE,
                  /*flags=*/LOOKUP_ONLYCONVERTING);
   DECL_IN_AGGR_P (fn) = 1;