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

            Bug ID: 62170
           Summary: wrong quoting (and colors) for typedef diagnostics
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manu at gcc dot gnu.org

typedef long Py_ssize_t;

int foo(Py_ssize_t *);

int bar() {
  typedef int Py_ssize_t;
  Py_ssize_t pos;
  return foo(&pos);
}

cc1plus:

aka.cc:8:18: error: cannot convert ‘Py_ssize_t* {aka int*}’ to ‘Py_ssize_t*
{aka long int*}’ for argument ‘1’ to ‘int foo(Py_ssize_t*)’
   return foo(&pos);
                  ^

clang++:

aka.cc:8:10: error: no matching function for call to 'foo'
  return foo(&pos);
         ^~~
aka.cc:3:5: note: candidate function not viable: no known conversion from
'Py_ssize_t *' (aka 'int *') to 'Py_ssize_t *' (aka 'long *') for 1st argument
int foo(Py_ssize_t *);
    ^

Reply via email to