This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42356] improve list of candidates and error recovery for ambiguous call
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Oct 2011 13:30:10 +0000
- Subject: [Bug c++/42356] improve list of candidates and error recovery for ambiguous call
- Auto-submitted: auto-generated
- References: <bug-42356-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42356
--- Comment #11 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2011-10-22 13:30:10 UTC ---
(In reply to comment #8)
> > 2) The reported list of overloads include those which have the wrong number of
> > arguments.
>
> That's by design. Maybe that's the function you meant to call. If you call a
> function with the wrong number of args you want the compiler to tell you name
> lookup found something, but overload resolution failed because the number of
> arguments didn't match.
I wonder why the detailed overload failure that Nathan implemented does not
trigger here. I would expect to give details of why overload failed.
g++ could also specify which ones are viable candidates, and which ones are not
even viable, and for the ones not viable, explain why.
> That might be an improvement, yes. That's the only issue I see here.
There is also the issue of the "expected primary-expression" triggered two
times.