From 522801e76c9547bf28f5347c0671a40d43b90302 Mon Sep 17 00:00:00 2001 From: Diego Novillo Date: Sat, 31 May 2003 22:32:42 +0000 Subject: [PATCH] class.c (dump_array): Call CONSTRUCTOR_ELTS to access the operand of a CONSTRUCTOR node. * class.c (dump_array): Call CONSTRUCTOR_ELTS to access the operand of a CONSTRUCTOR node. From-SVN: r67279 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/class.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ec071aeb559..85c5062451d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2003-05-31 Diego Novillo + + * class.c (dump_array): Call CONSTRUCTOR_ELTS to access + the operand of a CONSTRUCTOR node. + 2003-05-31 Gabriel Dos Reis * decl.c (cp_binding_level::this_entity): Rename from this_class. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index f5663841141..c4887f1bb8d 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -6671,7 +6671,7 @@ dump_array (FILE * stream, tree decl) TFF_PLAIN_IDENTIFIER)); fprintf (stream, "\n"); - for (ix = 0, inits = TREE_OPERAND (DECL_INITIAL (decl), 1); + for (ix = 0, inits = CONSTRUCTOR_ELTS (DECL_INITIAL (decl)); inits; ix++, inits = TREE_CHAIN (inits)) fprintf (stream, "%-4ld %s\n", (long)(ix * elt), expr_as_string (TREE_VALUE (inits), TFF_PLAIN_IDENTIFIER)); -- 2.30.2