PATCH for new-initializer crash
Mark Mitchell
mmitchell@usa.net
Mon Mar 16 10:47:00 GMT 1998
This change:
Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
* parse.y (new_initializer): Make sure all initializers are
lists.
broke g++.ext/arrnew.C, in the process of fixing another bug. Here's
a fix.
--
Mark Mitchell <mmitchell@usa.net>
http://home.earthlink.net/~mbmitchell
Consulting Services Available
Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
* parse.y: Deal with CONSTRUCTORS in new_initializers.
Index: parse.y
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/parse.y,v
retrieving revision 1.40
diff -c -p -r1.40 parse.y
*** parse.y 1998/03/11 07:25:18 1.40
--- parse.y 1998/03/16 18:45:16
*************** new_initializer:
*** 1217,1223 ****
{
if (pedantic)
pedwarn ("ANSI C++ forbids initialization of new expression with `='");
! if (TREE_CODE ($2) != TREE_LIST)
$$ = build_expr_list (NULL_TREE, $2);
else
$$ = $2;
--- 1217,1224 ----
{
if (pedantic)
pedwarn ("ANSI C++ forbids initialization of new expression with `='");
! if (TREE_CODE ($2) != TREE_LIST
! && TREE_CODE ($2) != CONSTRUCTOR)
$$ = build_expr_list (NULL_TREE, $2);
else
$$ = $2;
More information about the Gcc-bugs
mailing list