From 6be4a9793138a29b7bcfc2a053cd9bc231e57b79 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 6 Sep 2007 23:57:35 -0400 Subject: [PATCH] * decl2.c (get_guard): Copy visibility from the guarded variable. From-SVN: r128227 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/decl2.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8cea1221e733..5fafaadd3e90 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2007-09-06 Jason Merrill + + * decl2.c (get_guard): Copy visibility from the guarded variable. + 2007-09-06 Paolo Carlini PR c++/32674 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 4b9c0b5dfcfc..131e2dcf7514 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2224,6 +2224,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; -- 2.47.2