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

* [Bug c++/56359] [4.8 regression] Bogus "error: no matching function for call to ..."
  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 ` rguenth at gcc dot gnu.org
  2013-02-18 14:33 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-18 10:49 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |4.8.0
   Target Milestone|---                         |4.8.0


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

* [Bug c++/56359] [4.8 regression] Bogus "error: no matching function for call to ..."
  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
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-18 14:33 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-02-18
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-18 14:33:00 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190664


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

* [Bug c++/56359] [4.8 regression] Bogus "error: no matching function for call to ..."
  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
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-20 14:50 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug c++/56359] [4.8 regression] Bogus "error: no matching function for call to ..."
  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
                   ` (2 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-22 15:45 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |


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

* [Bug c++/56359] [4.8 regression] Bogus "error: no matching function for call to ..."
  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
                   ` (3 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-22 22:25 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-22 22:24:26 UTC ---
Author: jason
Date: Fri Feb 22 22:24:10 2013
New Revision: 196229

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196229
Log:
    PR c++/56359
    * call.c (can_convert_arg): Discard access checks.

Added:
    trunk/gcc/testsuite/g++.dg/template/access25.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c


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

* [Bug c++/56359] [4.8 regression] Bogus "error: no matching function for call to ..."
  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
                   ` (4 preceding siblings ...)
  2013-02-22 22:25 ` jason at gcc dot gnu.org
@ 2013-02-23  1:59 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-23  1:59 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-23 01:59:30 UTC ---
Fixed.


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