This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: undetected overloading ambiguity ?


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]