This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: undetected overloading ambiguity ?
- To: alain at sophia dot cnrs dot fr
- Subject: Re: undetected overloading ambiguity ?
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Thu, 24 Feb 2000 23:05:21 +0100
- CC: gcc-bugs at gcc dot gnu dot org
- References: <380463EB.10C0CB36@sophia.cnrs.fr>
> The following example illustrate what seems to be a (small)
> bug in gcc, basicaly, an overloaded function (let's call
> them f1 and f1) is called with two argument, gcc rightly
> select f1 for the first argument and f2 for the second. Yet,
> it fails to detect ambiguity when both arguments are
> provided.
Thanks for your bug report. This appears to be the result of an
extension; with -pedantic, gcc says
a.cc: In function `int main()':
a.cc:24: call of overloaded `f (A *, int)' is ambiguous
a.cc:8: candidates are: void f(const A *, int)
a.cc:9: void f(A *, B *)
Regards,
Martin