http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24985

--- Comment #36 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-13 
11:34:04 UTC ---
(In reply to comment #35)
> (In reply to comment #34)
> > 
> > btw, why do we print a location info for
> > 
> > t.C:5:6: note: candidates are:
> >    f(1);
> >       ^
> > 
> > at all?
> 
> I am proposing to print just: "note: candidates are:", with enough leading
> empty space to align with the previous error and no caret. Is that OK? 
> Richard,
> Jason?

Sounds good to me.  But I think GNU conventions require a location here?

> > 
> > 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);
                 ^

But that's of course a different bug.

Reply via email to