OSDN Git Service

* tree-pretty-print.c (dump_generic_node, case TYPE_DECL):
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Jun 2004 22:54:21 +0000 (22:54 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Jun 2004 22:54:21 +0000 (22:54 +0000)
Don't look at TYPE_METHODS unless RECORD_TYPE or UNION_TYPE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83619 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 32c0712..d46bb0a 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 fe115bc..477c283 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.  */