http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53289
Bug #: 53289 Summary: unnecessary repetition of caret diagnostics Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zeratul...@hotmail.com Consider the following (invalid) code: template <typename T> typename T::type g(T); int main() { g(1); } The error messages are as follows: test.cpp: In function 'int main()': test.cpp:6:8: error: no matching function for call to 'g(int)' g(1); ^ test.cpp:6:8: note: candidate is: g(1); ^ test.cpp:2:18: note: template<class T> typename T::type g(T) typename T::type g(T); ^ test.cpp:2:18: note: template argument deduction/substitution failed: typename T::type g(T); ^ test.cpp: In substitution of 'template<class T> typename T::type g(T) [with T = int]': test.cpp:6:8: required from here test.cpp:2:18: error: 'int' is not a class, struct, or union type typename T::type g(T); ^ The line with the call to g is shown twice; the line with the declaration of g is shown three times. These repetitions are unnecessary and waste valuable screen space.