summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cp
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-01-22 02:59:08 +0000
committerobrien <obrien@FreeBSD.org>2000-01-22 02:59:08 +0000
commit19e1413b5dc797995ed95bbd6ca6e3035103d982 (patch)
tree42c6ebe0872fe26c06d5ea952dadd4bcfa2e1fc2 /contrib/gcc/cp
parent06f3b914490df649b3b51002ca3211b12d1d0426 (diff)
downloadFreeBSD-src-19e1413b5dc797995ed95bbd6ca6e3035103d982.zip
FreeBSD-src-19e1413b5dc797995ed95bbd6ca6e3035103d982.tar.gz
Bring in bug fixes from the GCC anoncvs server's "gcc-2_95-branch"
branch on Jan 20th, 2000.
Diffstat (limited to 'contrib/gcc/cp')
-rw-r--r--contrib/gcc/cp/ChangeLog5
-rw-r--r--contrib/gcc/cp/decl2.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/contrib/gcc/cp/ChangeLog b/contrib/gcc/cp/ChangeLog
index efa30ed..605bafc 100644
--- a/contrib/gcc/cp/ChangeLog
+++ b/contrib/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
+
+ * decl2.c (maybe_make_one_only): Always make things comdat on
+ ELF targets, too.
+
Sun Oct 24 23:54:10 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95.2 Released.
diff --git a/contrib/gcc/cp/decl2.c b/contrib/gcc/cp/decl2.c
index d6fb7bf..bdeadb5 100644
--- a/contrib/gcc/cp/decl2.c
+++ b/contrib/gcc/cp/decl2.c
@@ -2485,9 +2485,13 @@ void
maybe_make_one_only (decl)
tree decl;
{
- /* This is not necessary on targets that support weak symbols, because
- the implicit instantiations will defer to the explicit one. */
- if (! supports_one_only () || SUPPORTS_WEAK)
+ /* We used to say that this was not necessary on targets that support weak
+ symbols, because the implicit instantiations will defer to the explicit
+ 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;
/* We can't set DECL_COMDAT on functions, or finish_file will think
OpenPOWER on IntegriCloud