This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
nw_expr in mapcar
- To: egcs-patches at cygnus dot com
- Subject: nw_expr in mapcar
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Sat, 30 May 1998 11:04:09 +0200
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