public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15169] New: unhandled overload resolution case
@ 2013-02-21 19:34 tromey at redhat dot com
  2013-10-31 19:40 ` [Bug c++/15169] " tromey at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: tromey at redhat dot com @ 2013-02-21 19:34 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/15169] unhandled overload resolution case
  2013-02-21 19:34 [Bug c++/15169] New: unhandled overload resolution case tromey at redhat dot com
@ 2013-10-31 19:40 ` tromey at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: tromey at redhat dot com @ 2013-10-31 19:40 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15169

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |16106

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-31 19:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-21 19:34 [Bug c++/15169] New: unhandled overload resolution case tromey at redhat dot com
2013-10-31 19:40 ` [Bug c++/15169] " tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).