diff options
author | Jason Merrill <jason@redhat.com> | 2013-01-29 12:24:51 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2013-01-29 12:24:51 -0500 |
commit | 2ee8a2d5ceea8470777bcc0f068af42ce174ea1f (patch) | |
tree | 8fd5fb8e5fdcef6275211a77cb7d725034403092 /gcc | |
parent | 77a035209c28b345536995adcfbd6ce8cdfb4611 (diff) | |
download | gcc-2ee8a2d5ceea8470777bcc0f068af42ce174ea1f.zip gcc-2ee8a2d5ceea8470777bcc0f068af42ce174ea1f.tar.gz gcc-2ee8a2d5ceea8470777bcc0f068af42ce174ea1f.tar.bz2 |
re PR libstdc++/54314 (undefined references to 'construction vtable for std::ostream-in-std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >')
PR libstdc++/54314
gcc/
* varasm.c (default_assemble_visibility): Don't warn about
visibility on artificial decls.
gcc/cp/
* class.c (build_ctor_vtbl_group): Give construction vtables
hidden visibility.
libstdc++-v3/
* config/abi/pre/gnu.ver: Don't export construction vtables.
* config/abi/pre/gnu-versioned-namespace.ver: Likewise.
From-SVN: r195550
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/class.c | 6 | ||||
-rw-r--r-- | gcc/varasm.c | 5 |
4 files changed, 21 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9273e4..42cb6248 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-01-29 Jason Merrill <jason@redhat.com> + + PR libstdc++/54314 + * varasm.c (default_assemble_visibility): Don't warn about + visibility on artificial decls. + 2013-01-29 Richard Biener <rguenther@suse.de> PR tree-optimization/56113 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1b640ff..65157e1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2013-01-29 Jason Merrill <jason@redhat.com> + + PR libstdc++/54314 + * class.c (build_ctor_vtbl_group): Give construction vtables + hidden visibility. + 2013-01-25 Jason Merrill <jason@redhat.com> PR c++/56095 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 605dd16..38339f2 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -8356,6 +8356,12 @@ build_ctor_vtbl_group (tree binfo, tree t) construction vtable group. */ vtbl = build_vtable (t, id, ptr_type_node); DECL_CONSTRUCTION_VTABLE_P (vtbl) = 1; + /* Don't export construction vtables from shared libraries. Even on + targets that don't support hidden visibility, this tells + can_refer_decl_in_current_unit_p not to assume that it's safe to + access from a different compilation unit (bz 54314). */ + DECL_VISIBILITY (vtbl) = VISIBILITY_HIDDEN; + DECL_VISIBILITY_SPECIFIED (vtbl) = true; v = NULL; accumulate_vtbl_inits (binfo, TYPE_BINFO (TREE_TYPE (binfo)), diff --git a/gcc/varasm.c b/gcc/varasm.c index 6b941ba..6648103 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -5788,8 +5788,9 @@ default_assemble_visibility (tree decl ATTRIBUTE_UNUSED, assemble_name (asm_out_file, name); fprintf (asm_out_file, "\n"); #else - warning (OPT_Wattributes, "visibility attribute not supported " - "in this configuration; ignored"); + if (!DECL_ARTIFICIAL (decl)) + warning (OPT_Wattributes, "visibility attribute not supported " + "in this configuration; ignored"); #endif } |