https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66130
--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Paolo Carlini from comment #7) > First blush I'm wondering if in this specific case we couldn't forward from > dump_decl to dump_expr and just print ‘l->*ptr’. AFAICS, wouldn't be a > regression and would allow us to adopt immediately Manuel' patch. I could simply do if (DECL_P(expr)) error("%qD") else error("%qE") but I was trying to avoid %qE because I think pretty-printing user coded expressions is something we should always avoid since they usually do not come out as written by the user. I would prefer to print: error: invalid use of non-static member function 'void (Local::*ptr)()' which tells the user that ->*ptr is a pointer to member-function.