http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24985
--- Comment #31 from Jason Merrill <jason at gcc dot gnu.org> 2012-04-12 21:44:23 UTC --- The effect of this patch on overload resolution diagnostics is problematic: ----- void f(); void f(int,int); int main() { f(1); } ----- wa2.C: In function ‘int main()’: wa2.C:6:6: error: no matching function for call to ‘f(int)’ f(1); ^ wa2.C:6:6: note: candidates are: f(1); ^ wa2.C:1:6: note: void f() void f(); ^ wa2.C:1:6: note: candidate expects 0 arguments, 1 provided void f(); ^ wa2.C:2:6: note: void f(int, int) void f(int,int); ^ wa2.C:2:6: note: candidate expects 2 arguments, 1 provided void f(int,int); ^ When there are multiple diagnostics at the same input location, we should only print the source/caret information once.