public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56359] New: [4.8 regression] Bogus "error: no matching function for call to ..."
@ 2013-02-17  1:19 ppluzhnikov at google dot com
  2013-02-18 10:49 ` [Bug c++/56359] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ppluzhnikov at google dot com @ 2013-02-17  1:19 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56359

             Bug #: 56359
           Summary: [4.8 regression] Bogus "error: no matching function
                    for call to ..."
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ppluzhnikov@google.com


Google ref b/8213841

Test case reduced from nodejs/src/node_io_watcher.cc



typedef int (*InvocationCallback) (const int &);

template < typename target_t >
void SetPrototypeMethod (target_t, const char *, InvocationCallback);

class A
{
    void Initialize ();
protected:
    static int Stop (const int &);
    void Stop ();  // comment out to make the bug disappear.
};

void
A::Initialize ()
{
    SetPrototypeMethod (0, "stop", A::Stop);
}


Compiles fine with gcc-4.7, fails with SVN trunk @196104:


g++ -c  t.ii
t.ii: In member function ‘void A::Initialize()’:
t.ii:17:43: error: no matching function for call to ‘SetPrototypeMethod(int,
const char [5], <unresolved overloaded function type>)’
     SetPrototypeMethod (0, "stop", A::Stop);
                                           ^
t.ii:17:43: note: candidate is:
t.ii:4:6: note: template<class target_t> void SetPrototypeMethod(target_t,
const char*, InvocationCallback)
 void SetPrototypeMethod (target_t, const char *, InvocationCallback);
      ^
t.ii:4:6: note:   template argument deduction/substitution failed:
t.ii: In substitution of ‘template<class target_t> void
SetPrototypeMethod(target_t, const char*, InvocationCallback) [with target_t =
int]’:
t.ii:17:43:   required from here
t.ii:10:16: error: ‘static int A::Stop(const int&)’ is protected
     static int Stop (const int &);
                ^
t.ii:17:43: error: within this context
     SetPrototypeMethod (0, "stop", A::Stop);
                                           ^


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

end of thread, other threads:[~2013-02-23  1:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-17  1:19 [Bug c++/56359] New: [4.8 regression] Bogus "error: no matching function for call to ..." ppluzhnikov at google dot com
2013-02-18 10:49 ` [Bug c++/56359] " rguenth at gcc dot gnu.org
2013-02-18 14:33 ` jakub at gcc dot gnu.org
2013-02-20 14:50 ` rguenth at gcc dot gnu.org
2013-02-22 15:45 ` jason at gcc dot gnu.org
2013-02-22 22:25 ` jason at gcc dot gnu.org
2013-02-23  1:59 ` jason at gcc dot gnu.org

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).