Commit b78121f6 by Jason Merrill Committed by Jason Merrill

decl2.c (maybe_make_one_only): Always make things comdat on ELF targets, too.

	* decl2.c (maybe_make_one_only): Always make things comdat on
	ELF targets, too.

From-SVN: r30341
parent c4d6cee3
1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (maybe_make_one_only): Always make things comdat on
ELF targets, too.
1999-10-31 Mark Mitchell <mark@codesourcery.com> 1999-10-31 Mark Mitchell <mark@codesourcery.com>
* decl.c (finish_function): Call free_after_parsing for functions * decl.c (finish_function): Call free_after_parsing for functions
......
...@@ -2365,9 +2365,13 @@ void ...@@ -2365,9 +2365,13 @@ void
maybe_make_one_only (decl) maybe_make_one_only (decl)
tree decl; tree decl;
{ {
/* This is not necessary on targets that support weak symbols, because /* We used to say that this was not necessary on targets that support weak
the implicit instantiations will defer to the explicit one. */ symbols, because the implicit instantiations will defer to the explicit
if (! supports_one_only () || SUPPORTS_WEAK) one. However, that's not actually the case in SVR4; a strong definition
after a weak one is an error. Also, not making explicit
instantiations one_only means that we can end up with two copies of
some template instantiations. */
if (! supports_one_only ())
return; return;
/* We can't set DECL_COMDAT on functions, or finish_file will think /* We can't set DECL_COMDAT on functions, or finish_file will think
......
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