http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48284
Summary: [C++0x] incorrect demangling of decltype operand in diagnostic Product: gcc Version: 4.5.2 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: r...@gcc.gnu.org template<typename C> auto g(C& c) -> decltype (c.f()) { return c.f(); } template<typename C> auto g(C& c) -> decltype (c.f()) { return c.f(); } x.C:5:32: error: redefinition of 'template<class C> decltype (c->f()) g(C&)' x.C:2:32: error: 'template<class C> decltype (c->f()) g(C&)' previously declared here The diagnostics show c->f() instead of c.f() Same result for 4.5 and 4.6, I didn't try 4.7