decl2.c (determine_visibility): Only check data visibility for VAR_DECLS.
authorPaul Brook <pbrook@gcc.gnu.org>
Thu, 2 Sep 2004 19:32:57 +0000 (19:32 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Thu, 2 Sep 2004 19:32:57 +0000 (19:32 +0000)
* decl2.c (determine_visibility): Only check data visibility
for VAR_DECLS.

[[Split portion of a mixed commit.]]

From-SVN: r86983.2

gcc/cp/ChangeLog
gcc/cp/decl2.c

index 929bde0077ec13417a7d7f4af4a676e9c3746663..14dac8258970726459df86e83155395a59c8cde0 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-02  Paul Brook  <paul@codesourcery.com>
+
+       * decl2.c (determine_visibility): Only check data visibility
+       for VAR_DECLS.
+
 2004-08-31  Mark Mitchell  <mark@codesourcery.com>
 
        * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
@@ -5,7 +10,7 @@
        * decl2.c (determine_visibility): Honor 
        TARGET_CXX_EXPORT_CLASS_DATA.
 
-       * class.c (key_method): Rename to ...
+       * class.c (key_method): Rename to ...
        (determine_key_method): ... this.
        (finish_struct_1): Adjust accordingly.
        * cp-tree.h (key_method): Declare.
index c26d48fe954e1a5afef00b04bb38b91a7f925a07..03c468dfd42c8c9d15469fe83806ced3c8950bc1 100644 (file)
@@ -1655,7 +1655,8 @@ determine_visibility (tree decl)
      the visibility of their containing class.  */
   if (class_type)
     {
-      if (targetm.cxx.export_class_data ()
+      if (TREE_CODE (decl) == VAR_DECL
+         && targetm.cxx.export_class_data ()
          && (DECL_TINFO_P (decl)
              || (DECL_VTABLE_OR_VTT_P (decl)
                  /* Construction virtual tables are not emitted