aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-01-13 12:50:58 -0500
committerJason Merrill <jason@gcc.gnu.org>2012-01-13 12:50:58 -0500
commitfc97053254977c2709b8eca3caed6558e2ade7e2 (patch)
tree9e0083b635cde123424490c4b1adef4c0b50cfee /gcc/cp/decl2.c
parent4ce7d589feeb878cbd482f4b03b369698dab0528 (diff)
downloadgcc-fc97053254977c2709b8eca3caed6558e2ade7e2.zip
gcc-fc97053254977c2709b8eca3caed6558e2ade7e2.tar.gz
gcc-fc97053254977c2709b8eca3caed6558e2ade7e2.tar.bz2
re PR c++/51813 (-fvisibility=hidden causes std::codecvt members to be undefined)
PR c++/51813 * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED when reducing the visibility. From-SVN: r183156
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 05f4b42..0cde6c6 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1984,6 +1984,8 @@ constrain_visibility (tree decl, int visibility, bool tmpl)
&& (tmpl || !DECL_VISIBILITY_SPECIFIED (decl)))
{
DECL_VISIBILITY (decl) = (enum symbol_visibility) visibility;
+ /* This visibility was not specified. */
+ DECL_VISIBILITY_SPECIFIED (decl) = false;
}
}