From: Jason Merrill Date: Fri, 7 Sep 2007 03:57:35 +0000 (-0400) Subject: * decl2.c (get_guard): Copy visibility from the guarded variable. X-Git-Tag: releases/gcc-4.2.2~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6be4a9793138a29b7bcfc2a053cd9bc231e57b79;p=thirdparty%2Fgcc.git * decl2.c (get_guard): Copy visibility from the guarded variable. From-SVN: r128227 --- 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;