From 6e6e49b10f94aaf10b6e9224e07130ab2d818f14 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 24 Jun 2004 22:54:21 +0000 Subject: [PATCH] tree-pretty-print.c (dump_generic_node, [...]): Don't look at TYPE_METHODS unless RECORD_TYPE or UNION_TYPE. * 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 | 5 +++++ gcc/tree-pretty-print.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 32c07125d0a..d46bb0a8f0a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-06-24 Richard Kenner + + * 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 * objc-act.c (build_objc_method_call): Save the lookup_object diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index fe115bc3ca8..477c2830b32 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -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. */ -- 2.30.2