+2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
+
+ * call.c (build_op_delete_call): Use strip_array_call. Correct
+ error message to say 'delete' or 'delete[]'.
+
2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
PR c++/8266
if (addr == error_mark_node)
return error_mark_node;
- type = TREE_TYPE (TREE_TYPE (addr));
- while (TREE_CODE (type) == ARRAY_TYPE)
- type = TREE_TYPE (type);
+ type = strip_array_types (TREE_TYPE (TREE_TYPE (addr)));
fnname = ansi_opname (code);
addr = cp_convert (ptr_type_node, addr);
/* We make two tries at finding a matching `operator delete'. On
- the first pass, we look for an one-operator (or placement)
+ the first pass, we look for a one-operator (or placement)
operator delete. If we're not doing placement delete, then on
the second pass we look for a two-argument delete. */
for (pass = 0; pass < (placement ? 1 : 2); ++pass)
if (placement)
return NULL_TREE;
- error ("no suitable `operator delete' for `%T'", type);
+ error ("no suitable `operator %s' for `%T'",
+ operator_name_info[(int)code].name, type);
return error_mark_node;
}