+2003-04-29 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/10527
+ * error.c (dump_expr): Correctly handling of NEW_EXPR.4
+
2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* call.c (build_operator_new_call): Fix typo.
case NEW_EXPR:
{
tree type = TREE_OPERAND (t, 1);
+ tree init = TREE_OPERAND (t, 2);
if (NEW_EXPR_USE_GLOBAL (t))
print_scope_operator (scratch_buffer);
output_add_string (scratch_buffer, "new ");
TREE_OPERAND (type, 1),
integer_one_node))));
dump_type (type, flags);
- if (TREE_OPERAND (t, 2))
+ if (init)
{
print_left_paren (scratch_buffer);
- dump_expr_list (TREE_OPERAND (t, 2), flags);
+ if (TREE_CODE (init) == TREE_LIST)
+ dump_expr_list (init, flags);
+ else if (init == void_zero_node)
+ /* This representation indicates an empty initializer,
+ e.g.: "new int()". */
+ ;
+ else
+ dump_expr (init, flags);
print_right_paren (scratch_buffer);
}
}
+2003-04-29 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/10527
+ * g++.dg/init/new7.C: New test.
+
2003-04-29 Mark Mitchell <mark@codesourcery.com>
* g++.dg/ext/desig1.C: New test.
- * g++.dg/ext/init1.C: Likewise.
+ * g++.dg/ext/init1.C: Update.
* g++.old-deja/g++.pt/deduct5.C: Remove unnecessary initializer.