From 63e9329f9faabf1e3b768a8d1e5d63d3dbcd4ff3 Mon Sep 17 00:00:00 2001
From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 5 Apr 2006 22:32:25 +0000
Subject: [PATCH]         * name-lookup.c (push_namespace_with_attribs):
 Temporarily disable         default hidden visibility for anonymous
 namespace.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112722 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/cp/ChangeLog                            | 5 +++++
 gcc/cp/name-lookup.c                        | 2 +-
 gcc/testsuite/g++.dg/ext/visibility/anon1.C | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 67de4f7f61e2..96191a2bb7fd 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-05  Jason Merrill  <jason@redhat.com>
+
+	* name-lookup.c (push_namespace_with_attribs): Temporarily disable
+	default hidden visibility for anonymous namespace.
+
 2006-03-29  Roger Sayle  <roger@eyesopen.com>
 
 	PR c++/22494
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 5aa16f1f373a..e41d54f3f65e 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -3066,7 +3066,7 @@ push_namespace_with_attribs (tree name, tree attributes)
       push_visibility (TREE_STRING_POINTER (x));
       goto found;
     }
-#ifdef HAVE_GAS_HIDDEN
+#if 0
   if (anon)
     {
       /* Anonymous namespaces default to hidden visibility.  This might
diff --git a/gcc/testsuite/g++.dg/ext/visibility/anon1.C b/gcc/testsuite/g++.dg/ext/visibility/anon1.C
index 9a3d8a7f8ab6..81e92708ab05 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/anon1.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/anon1.C
@@ -2,7 +2,7 @@
 // Test for anonymous namespace default hidden visibility
 
 // { dg-require-visibility "" }
-// { dg-final { scan-hidden "_ZN.*1fEv" } }
+// { dg-final-NOT { scan-hidden "_ZN.*1fEv" } }
 
 namespace
 {
-- 
GitLab