https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94803

            Bug ID: 94803
           Summary: wrong class name in error message
           Product: gcc
           Version: 9.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: f.heckenb...@fh-soft.de
  Target Milestone: ---

% cat test.cpp
struct a
{
  void f ();
};

struct b: a
{
  void f () { a::f (0); }
};

int main ()
{
}

% g++ test.cpp
test.cpp: In member function 'void b::f()':
test.cpp:8:22: error: no matching function for call to 'b::f(int)'
    8 |   void f () { a::f (0); }
      |                      ^
test.cpp:3:8: note: candidate: 'void a::f()'
    3 |   void f ();
      |        ^
test.cpp:3:8: note:   candidate expects 0 arguments, 1 provided

It says "call to 'b::f(int)'", but the call is explicitly to a::f.

Reply via email to