This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/15169] New: unhandled overload resolution case
- From: "tromey at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 21 Feb 2013 19:34:42 +0000
- Subject: [Bug c++/15169] New: unhandled overload resolution case
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15169
Bug #: 15169
Summary: unhandled overload resolution case
Product: gdb
Version: unknown
Status: NEW
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned@sourceware.org
ReportedBy: tromey@redhat.com
Classification: Unclassified
This code is valid c++:
double f(double x) { return x; }
int f(int x) { return x; }
int overload(int x, int (*f)(int)) { return f(x); }
int main()
{
return overload(0, f);
}
However, gdb does not handle this:
(gdb) p overload(0,f)
Cannot resolve function overload to any overloaded instance
Note that the order of the definitions of "f" matters.
If you change them, this will appear to work, because
gdb will then pick the correct "f" by accident.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.