This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: fix PR c++/15116
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 21 Feb 2013 12:34:29 -0700
- Subject: Re: RFC: fix PR c++/15116
- References: <87ppztbh2x.fsf@fleche.redhat.com>
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
Tom> Second, overload resolution can actually do a kind of second overload
Tom> resolution, according to the standard. This is well-formed:
Tom> int f(int x) { return x; }
Tom> double f(double x) { return x; }
A minor note. It turns out that the example as written actually does
work. This is because the correct "f" appears first in the CU.
If you swap these two lines, you can make it fail:
(gdb) p overload(0,f)
Cannot resolve function overload to any overloaded instance
I've pointed this out in the PR I'm filing.
Tom