From: H.J. Lu Date: Tue, 17 May 2005 21:47:13 +0000 (+0000) Subject: re PR libstdc++/19664 (libstdc++ headers should have pop/push of the visibility aroun... X-Git-Tag: misc/cutover-cvs2svn~3082 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=271bed0e992f4066d8ae679b0feaec448b868306;p=thirdparty%2Fgcc.git re PR libstdc++/19664 (libstdc++ headers should have pop/push of the visibility around the declarations) 2005-05-17 H.J. Lu PR C++/19664 * decl2.c (determine_visibility): Don't set visibility to hidden if it has been set explicitly by user. From-SVN: r99861 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e67d716d007c..13a724039481 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2005-05-17 H.J. Lu + + PR C++/19664 + * decl2.c (determine_visibility): Don't set visibility to + hidden if it has been set explicitly by user. + 2005-05-17 Mike Stump Yet more Objective-C++... diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 206cd6ba400b..970c6381cc60 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1624,8 +1624,12 @@ determine_visibility (tree decl) && DECL_DECLARED_INLINE_P (decl) && visibility_options.inlines_hidden) { - DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN; - DECL_VISIBILITY_SPECIFIED (decl) = 1; + /* Don't change it if it has been set explicitly by user. */ + if (!DECL_VISIBILITY_SPECIFIED (decl)) + { + DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN; + DECL_VISIBILITY_SPECIFIED (decl) = 1; + } } else if (CLASSTYPE_VISIBILITY_SPECIFIED (class_type)) {