]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/19664 (libstdc++ headers should have pop/push of the visibility aroun...
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 17 May 2005 21:47:13 +0000 (21:47 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 17 May 2005 21:47:13 +0000 (14:47 -0700)
2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>

PR C++/19664
* decl2.c (determine_visibility): Don't set visibility to
hidden if it has been set explicitly by user.

From-SVN: r99861

gcc/cp/ChangeLog
gcc/cp/decl2.c

index e67d716d007cd15123305bf3da4041e04302f81e..13a7240394815cbda7d583e34125911165322a92 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+       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  <mrs@apple.com>
 
        Yet more Objective-C++...
index 206cd6ba400b031704639d9516f32d923940aaf5..970c6381cc608b1ff8c5535e8359bda659148763 100644 (file)
@@ -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))
        {