aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2007-09-06 23:56:41 -0400
committerJason Merrill <jason@gcc.gnu.org>2007-09-06 23:56:41 -0400
commit3fd406847c6942d6400b16094cc780364e174d81 (patch)
tree16788879d648f3ed19c94b7f165ce05233075837 /gcc/cp
parentbd1a56a0c3b639f1b343bf530bbdff004354848e (diff)
downloadgcc-3fd406847c6942d6400b16094cc780364e174d81.zip
gcc-3fd406847c6942d6400b16094cc780364e174d81.tar.gz
gcc-3fd406847c6942d6400b16094cc780364e174d81.tar.bz2
* decl2.c (get_guard): Copy visibility from the guarded variable.
From-SVN: r128226
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/decl2.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 12cdd80..b5229b3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-06 Jason Merrill <jason@redhat.com>
+
+ * decl2.c (get_guard): Copy visibility from the guarded variable.
+
2007-09-06 Jan Hubicka <jh@suse.cz>
* semantics.c (expand_body): Do not mark arguments of clones used.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 2708e58..db578d8 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2215,6 +2215,8 @@ get_guard (tree decl)
DECL_ONE_ONLY (guard) = DECL_ONE_ONLY (decl);
if (TREE_PUBLIC (decl))
DECL_WEAK (guard) = DECL_WEAK (decl);
+ DECL_VISIBILITY (guard) = DECL_VISIBILITY (decl);
+ DECL_VISIBILITY_SPECIFIED (guard) = DECL_VISIBILITY_SPECIFIED (decl);
DECL_ARTIFICIAL (guard) = 1;
DECL_IGNORED_P (guard) = 1;