This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix quoting in error message for operator delete.
- From: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 26 May 2005 15:42:05 +0200 (CEST)
- Subject: [patch] Fix quoting in error message for operator delete.
The quoting in the error message for the following testcase is hosed:
---------------------------------------
struct A
{
void operator delete(void*,int);
};
void foo()
{
A *p;
delete p;
}
---------------------------------------
The error message reads:
bug.cc: In function 'void foo()':
bug.cc:9: error: no suitable 'operator delete> for 'A'
Note the ">" after "delete".
The bug affects mainline and the 4.0 branch.
The following trivial patch fixes that.
Bootstrapped and regtested on i686-pc-linux-gnu.
Applied to 4.0 branch and mainline as obvious.
Regards,
Volker
2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* call.c (build_op_delete_call): Fix quoting in error message.
=============================================================================
--- gcc/gcc/cp/call.c 2005-05-24 23:59:37.000000000 +0200
+++ gcc/gcc/cp/call.c 2005-05-25 00:02:45.000000000 +0200
@@ -4035,7 +4035,7 @@ build_op_delete_call (enum tree_code cod
if (placement)
return NULL_TREE;
- error ("no suitable %<operator %s> for %qT",
+ error ("no suitable %<operator %s%> for %qT",
operator_name_info[(int)code].name, type);
return error_mark_node;
}
=============================================================================