tree-pretty-print.c (dump_generic_node, [...]): Don't look at TYPE_METHODS unless...
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Thu, 24 Jun 2004 22:54:21 +0000 (22:54 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 24 Jun 2004 22:54:21 +0000 (18:54 -0400)
* tree-pretty-print.c (dump_generic_node, case TYPE_DECL):
Don't look at TYPE_METHODS unless RECORD_TYPE or UNION_TYPE.

From-SVN: r83619

gcc/ChangeLog
gcc/tree-pretty-print.c

index 32c07125d0a284096c42f5bf3dc2c85966af8d09..d46bb0a8f0a42aeae96b0ee0168a1e597654e117 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-24  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * tree-pretty-print.c (dump_generic_node, case TYPE_DECL):
+       Don't look at TYPE_METHODS unless RECORD_TYPE or UNION_TYPE.
+
 2004-06-24  Andrew Pinski  <apinski@apple.com>
 
        * objc-act.c (build_objc_method_call): Save the lookup_object
index fe115bc3ca8e644680cf2e507118c5d9057ae217..477c2830b32acc6867efdcff62adcf8fbc7c8321 100644 (file)
@@ -549,7 +549,9 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
        }
       else
        {
-         if (TYPE_METHODS (TREE_TYPE (node)))
+         if ((TREE_CODE (TREE_TYPE (node)) == RECORD_TYPE
+              || TREE_CODE (TREE_TYPE (node)) == UNION_TYPE)
+             && TYPE_METHODS (TREE_TYPE (node)))
            {
              /* The type is a c++ class: all structures have at least
                 4 methods.  */