From: Jonathan Wakely Date: Tue, 24 Jun 2008 20:44:04 +0000 (+0000) Subject: re PR c++/23194 (Unhelpful diagnostic for incorrect pointer-to-member function syntax) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b98a7257e8957c74611788d9020d8cd613d7d89;p=gcc.git re PR c++/23194 (Unhelpful diagnostic for incorrect pointer-to-member function syntax) PR c++/23194 * typeck.c (cp_build_function_call): Show example syntax in diagnostic. From-SVN: r137086 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 78f1d87a447..df1a46bdf94 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2008-06-24 Jonathan Wakely + + PR c++/23194 + * typeck.c (cp_build_function_call): Show example syntax in + diagnostic. + 2008-06-21 Jonathan Wakely * typeck.c (composite_pointer_type_r, cxx_sizeof_expr, diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 8fd3be2c68d..e34fa675b9f 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -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; }