diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2003-06-26 15:23:54 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2003-06-26 15:23:54 +0000 |
commit | 8d4ce389228d4c29caff51712de88952b72ed212 (patch) | |
tree | 41f034d26ab97f8197ec994ec9caf96f75ff05b9 /gcc/cp | |
parent | d9e674f7f06ca4e3043b3c315fbf557b6575815c (diff) | |
download | gcc-8d4ce389228d4c29caff51712de88952b72ed212.zip gcc-8d4ce389228d4c29caff51712de88952b72ed212.tar.gz gcc-8d4ce389228d4c29caff51712de88952b72ed212.tar.bz2 |
call.c (build_op_delete_call): Use strip_array_call.
* call.c (build_op_delete_call): Use strip_array_call. Correct
error message to say 'delete' or 'delete[]'.
From-SVN: r68536
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/call.c | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4a36f17..9a22768 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 41ad02d..ddc6b4b 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -3963,9 +3963,7 @@ build_op_delete_call (enum tree_code code, tree addr, tree size, 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); @@ -4018,7 +4016,7 @@ build_op_delete_call (enum tree_code code, tree addr, tree size, 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) @@ -4089,7 +4087,8 @@ build_op_delete_call (enum tree_code code, tree addr, tree size, 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; } |