re PR c++/23194 (Unhelpful diagnostic for incorrect pointer-to-member function syntax)
authorJonathan Wakely <jwakely.gcc@gmail.com>
Tue, 24 Jun 2008 20:44:04 +0000 (20:44 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 24 Jun 2008 20:44:04 +0000 (21:44 +0100)
PR c++/23194
* typeck.c (cp_build_function_call): Show example syntax in
diagnostic.

From-SVN: r137086

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

index 78f1d87a44719f0371ad5be069b081aa5c4c9011..df1a46bdf945d0f030d733d28d104d0ba2073df0 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 8fd3be2c68dd302075c2f7755871bfc768cf9ac9..e34fa675b9f7e55a51411b0d77ce20642e54daa0 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;
     }