[patch] Fix quoting in error message for operator delete.

Volker Reichelt reichelt@igpm.rwth-aachen.de
Thu May 26 13:49:00 GMT 2005


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;
 }
=============================================================================




More information about the Gcc-patches mailing list