OSDN Git Service

2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 May 2005 21:47:13 +0000 (21:47 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 May 2005 21:47:13 +0000 (21:47 +0000)
PR C++/19664
* decl2.c (determine_visibility): Don't set visibility to
hidden if it has been set explicitly by user.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99861 138bc75d-0d04-0410-961f-82ee72b054a4

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

index e67d716..13a7240 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 206cd6b..970c638 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))
        {