From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1676 invoked by alias); 21 Feb 2013 19:34:45 -0000 Received: (qmail 1564 invoked by uid 48); 21 Feb 2013 19:34:44 -0000 From: "tromey at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/15169] New: unhandled overload resolution case Date: Thu, 21 Feb 2013 19:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2013-q1/txt/msg00284.txt.bz2 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.