C++ PATCH to fix dumps of COND_EXPRs

Mark Mitchell mark@codesourcery.com
Wed Oct 6 20:35:00 GMT 1999


We were only dumping the first two operands to a COND_EXPR.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

1999-10-06  Mark Mitchell  <mark@codesourcery.com>

	* dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.

Index: ChangeLog
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/ChangeLog,v
retrieving revision 1.1365
diff -c -p -r1.1365 ChangeLog
*** ChangeLog	1999/10/06 19:01:40	1.1365
--- ChangeLog	1999/10/07 03:33:29
***************
*** 1,5 ****
--- 1,7 ----
  1999-10-06  Mark Mitchell  <mark@codesourcery.com>
  
+ 	* dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
+ 
  	* cp-tree.h (CLASSTYPE_VFIELD): Remove.
  	* call.c (build_vfield_ref): Use TYPE_VFIELD, not
  	CLASSTYPE_VFIELD.
Index: dump.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/dump.c,v
retrieving revision 1.21
diff -c -p -r1.21 dump.c
*** dump.c	1999/10/06 19:01:44	1.21
--- dump.c	1999/10/07 03:33:29
*************** dequeue_and_dump (di)
*** 783,793 ****
      case MODIFY_EXPR:
      case COMPONENT_REF:
      case COMPOUND_EXPR:
-     case COND_EXPR:
      case ARRAY_REF:
        /* These nodes are binary, but do not have code class `2'.  */
        dump_child ("op 0", TREE_OPERAND (t, 0));
        dump_child ("op 1", TREE_OPERAND (t, 1));
        break;
  
      case CALL_EXPR:
--- 783,798 ----
      case MODIFY_EXPR:
      case COMPONENT_REF:
      case COMPOUND_EXPR:
      case ARRAY_REF:
        /* These nodes are binary, but do not have code class `2'.  */
        dump_child ("op 0", TREE_OPERAND (t, 0));
        dump_child ("op 1", TREE_OPERAND (t, 1));
+       break;
+ 
+     case COND_EXPR:
+       dump_child ("op 0", TREE_OPERAND (t, 0));
+       dump_child ("op 1", TREE_OPERAND (t, 1));
+       dump_child ("op 2", TREE_OPERAND (t, 2));
        break;
  
      case CALL_EXPR:


More information about the Gcc-patches mailing list