Commit 9148ab01 by Julian Brown Committed by Julian Brown

* decl.c (finish_method): Give methods once-only linkage.

From-SVN: r96106
parent 77fb4cc1
2005-03-08 Julian Brown <julian@codesourcery.com>
* decl.c (finish_method): Give methods once-only linkage.
2005-03-07 Bryce McKinlay <mckinlay@redhat.com> 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
* verify-glue.c (vfy_is_assignable_from): Perform static check using * verify-glue.c (vfy_is_assignable_from): Perform static check using
......
...@@ -2036,6 +2036,13 @@ finish_method (tree fndecl) ...@@ -2036,6 +2036,13 @@ finish_method (tree fndecl)
build2 (TRY_FINALLY_EXPR, void_type_node, *tp, exit)); build2 (TRY_FINALLY_EXPR, void_type_node, *tp, exit));
} }
/* Ensure non-abstract non-static non-private members are defined only once
when linking. This is an issue when using CNI to interface with C++ object
files. */
if (! METHOD_STATIC (fndecl) && ! METHOD_PRIVATE (fndecl)
&& ! METHOD_ABSTRACT (fndecl))
make_decl_one_only (fndecl);
/* Prepend class initialization for static methods reachable from /* Prepend class initialization for static methods reachable from
other classes. */ other classes. */
if (METHOD_STATIC (fndecl) && ! METHOD_PRIVATE (fndecl) if (METHOD_STATIC (fndecl) && ! METHOD_PRIVATE (fndecl)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment