]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/13714 (destructor name `const s' does not match type `const s' of expression)
authorMark Mitchell <mark@codesourcery.com>
Thu, 5 Feb 2004 19:45:47 +0000 (19:45 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 5 Feb 2004 19:45:47 +0000 (19:45 +0000)
PR c++/13714
* typeck.c (lookup_destructor): Tweak error message.

From-SVN: r77334

gcc/cp/ChangeLog
gcc/cp/typeck.c

index e1d559fbb24434eb86b23e26d53a22bceb6492cc..636fb21bc77604dfb9b917afbc2520bc9c5be132 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-05  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/13714
+       * typeck.c (lookup_destructor): Tweak error message.
+
 2004-02-05  Jan Hubicka  <jh@suse.cz>
 
        * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
index c6d273a6170a2f19f6698c77b1cd8b0aa492d0a0..4082a1b23b085e27f6eab12d23df21c77b510574 100644 (file)
@@ -1801,8 +1801,8 @@ lookup_destructor (tree object, tree scope, tree dtor_name)
     }
   if (!same_type_p (dtor_type, TYPE_MAIN_VARIANT (object_type)))
     {
-      error ("destructor name `%T' does not match type `%T' of expression",
-            dtor_type, object_type);
+      error ("the type being destroyed is '%T', but the destructor refers to `%T'",
+            TYPE_MAIN_VARIANT (object_type), dtor_type);
       return error_mark_node;
     }
   if (!TYPE_HAS_DESTRUCTOR (object_type))