$DragonFly: src/gnu/usr.bin/cc34/cc1plus/patches/rtti.c.patch,v 1.1 2004/12/21 13:10:47 joerg Exp $ =================================================================== RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/gcc-3.4/gcc/cp/rtti.c,v retrieving revision 1.1 diff -u -r1.1 rtti.c --- rtti.c 20 Jun 2004 02:14:51 -0000 1.1 +++ rtti.c 20 Dec 2004 20:59:07 -0000 @@ -361,7 +361,11 @@ pushdecl_top_level_and_finish (d, NULL_TREE); if (CLASS_TYPE_P (type)) - CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d; + { + CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d; + DECL_VISIBILITY (d) = CLASSTYPE_VISIBILITY (type); + DECL_VISIBILITYSPECIFIED (d) = CLASSTYPE_VISIBILITYSPECIFIED (type); + } /* Remember the type it is for. */ TREE_TYPE (name) = type; @@ -759,6 +763,11 @@ TREE_STATIC (name_decl) = 1; DECL_EXTERNAL (name_decl) = 0; TREE_PUBLIC (name_decl) = 1; + if (CLASS_TYPE_P (target)) + { + DECL_VISIBILITY (name_decl) = CLASSTYPE_VISIBILITY (target); + DECL_VISIBILITYSPECIFIED (name_decl) = CLASSTYPE_VISIBILITYSPECIFIED (target); + } import_export_tinfo (name_decl, target, typeinfo_in_lib_p (target)); /* External name of the string containing the type's name has a special name. */