This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

nw_expr in mapcar


eb104 passes NEW_EXPR to mapcar. With this patch, it compiles.

Martin

1998-05-30  Martin von Löwis  <loewis@informatik.hu-berlin.de>

	* tree.c (mapcar): Support NEW_EXPR.

Index: tree.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/tree.c,v
retrieving revision 1.44
diff -c -p -r1.44 tree.c
*** tree.c	1998/05/29 23:17:23	1.44
--- tree.c	1998/05/30 09:01:49
*************** mapcar (t, func)
*** 1753,1758 ****
--- 1753,1765 ----
        TREE_OPERAND (t, 2) = NULL_TREE;
        return t;
  
+     case NEW_EXPR:
+       t = copy_node (t);
+       TREE_OPERAND (t, 0) = mapcar (TREE_OPERAND (t, 0), func);
+       TREE_OPERAND (t, 1) = mapcar (TREE_OPERAND (t, 1), func);
+       TREE_OPERAND (t, 2) = mapcar (TREE_OPERAND (t, 2), func);
+       return t;
+ 
      case RECORD_TYPE:
        if (TYPE_PTRMEMFUNC_P (t))
  	return build_ptrmemfunc_type


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]