PR c++/23194
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Jun 2008 20:44:04 +0000 (20:44 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Jun 2008 20:44:04 +0000 (20:44 +0000)
* typeck.c (cp_build_function_call): Show example syntax in
diagnostic.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137086 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 78f1d87..df1a46b 100644 (file)
@@ -1,3 +1,9 @@
+2008-06-24  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       PR c++/23194
+       * typeck.c (cp_build_function_call): Show example syntax in
+       diagnostic.
+
 2008-06-21  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
index 8fd3be2..e34fa67 100644 (file)
@@ -2850,8 +2850,8 @@ cp_build_function_call (tree function, tree params, tsubst_flags_t complain)
     {
       if (complain & tf_error)
        error ("must use %<.*%> or %<->*%> to call pointer-to-member "
-              "function in %<%E (...)%>",
-              original);
+              "function in %<%E (...)%>, e.g. %<(... ->* %E) (...)%>",
+              original, original);
       return error_mark_node;
     }