summaryrefslogtreecommitdiff
path: root/gcc/config/i386/winnt.c
diff options
context:
space:
mode:
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-13 20:01:57 +0000
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-13 20:01:57 +0000
commitde0e5a52259b23304399929931b739ca08d008c4 (patch)
tree278e301a60748bc6875711d5bc89ab30014083bf /gcc/config/i386/winnt.c
parent752095b4d9a649097dc04bb99de66d6b12954015 (diff)
downloadgcc-de0e5a52259b23304399929931b739ca08d008c4.tar.gz
2011-01-13 Kai Tietz <kai.tietz@onevision.com>
PR c++/47213 * g++.dg/ext/pr47213.C: New. 2011-01-13 Kai Tietz <kai.tietz@onevision.com> PR c++/47213 * cp-tree.h (CLASSTYPE_VISIBILITY): Use TYPE_MAIN_DECL instead of TYPE_NAME. (CLASSTYPE_VISIBILITY_SPECIFIED): Likewise. * decl2.c (determine_visibility): Add check of CLASS_TYPE_P for underlying_type. 2011-01-13 Kai Tietz <kai.tietz@onevision.com> PR c++/47213 * config/i386/cygming.h (TARGET_ASM_ASSEMBLE_VISIBILITY): PE specific hook. * config/i386/i386-protos.h (i386_pe_assemble_visibility): New function prototype. * config/i386/winnt.c (i386_pe_assemble_visibility): Warn only if attribute was specified by user. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168763 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386/winnt.c')
-rw-r--r--gcc/config/i386/winnt.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index c413bb0a3eb..169832fd36a 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -232,6 +232,22 @@ i386_pe_maybe_mangle_decl_assembler_name (tree decl, tree id)
return new_id;
}
+/* Emit an assembler directive to set symbol for DECL visibility to
+ the visibility type VIS, which must not be VISIBILITY_DEFAULT.
+ As for PE there is no hidden support in gas, we just warn for
+ user-specified visibility attributes. */
+
+void
+i386_pe_assemble_visibility (tree decl,
+ int vis ATTRIBUTE_UNUSED)
+{
+ if (!decl
+ || !lookup_attribute ("visibility", DECL_ATTRIBUTES (decl)))
+ return;
+ warning (OPT_Wattributes, "visibility attribute not supported "
+ "in this configuration; ignored");
+}
+
/* This is used as a target hook to modify the DECL_ASSEMBLER_NAME
in the language-independent default hook
langhooks,c:lhd_set_decl_assembler_name ()