aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/method.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4703ed8..a15f152 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 8745dce..b7abe96 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -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;