http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24985
--- Comment #38 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-13 11:53:31 UTC --- (In reply to comment #36) > > > t.C:1:6: note: candidate expects 0 arguments, 1 provided > > > void f(); void f(int,int); > > > ^ > > > t.C:1:17: note: void f(int, int) > > > void f(); void f(int,int); > > > ^ > > > > > > and the 2nd note here looks wrong. > > > > Could you explain why? > > Because void f(int, int) is not of type "candidate expects 0 arguments" but > it is of expects two which is duplicate of the following > > t.C:1:17: note: candidate expects 2 arguments, 1 provided > void f(); void f(int,int); > ^ You're confusing two separate notes. This bit refers to the first overload, which expects 0 args: t.C:1:6: note: candidate expects 0 arguments, 1 provided void f(); void f(int,int); ^ And this bit refers to the second overload: t.C:1:17: note: void f(int, int) void f(); void f(int,int); ^ The line following says "expects 2 arguments" This is why in my previous comment I suggested removing the caret diagnostic between the related notes, so the notes that refer to the same thing are adjacent.