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

            Bug ID: 85110
           Summary: Missing underlines for some bad arguments
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

In gcc 8, the C++ FE underlines some bogus arguments to function calls, as of
r256448.

However we're missing some.  Given:

void callee (int one, const char **two, int three);

void
caller (const char *fmt)
{
  callee (1, fmt, 3);
}

We emit:

$ g++ test.cc
test.cc: In function ‘void caller(const char*)’:
test.cc:6:20: error: cannot convert ‘const char*’ to ‘const char**’ for
argument ‘2’ to ‘void callee(int, const char**, int)’
   callee (1, fmt, 3);
                    ^

We ought to underline the problematic argument, and, ideally the decl.

I have a patch for this.

Reply via email to