aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2005-05-17 21:47:13 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2005-05-17 14:47:13 -0700
commit271bed0e992f4066d8ae679b0feaec448b868306 (patch)
tree934cb06f2c6acf0410b3db160e7ed87152595319 /gcc
parent684aaf29c03351ad615ef8dd3ff52e1e312704c2 (diff)
downloadgcc-271bed0e992f4066d8ae679b0feaec448b868306.zip
gcc-271bed0e992f4066d8ae679b0feaec448b868306.tar.gz
gcc-271bed0e992f4066d8ae679b0feaec448b868306.tar.bz2
re PR libstdc++/19664 (libstdc++ headers should have pop/push of the visibility around the declarations)
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl2.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e67d716..13a7240 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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++...
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 206cd6b..970c638 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))
{