[Bug c/56724] sub-optimal location in error
dmalcolm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 25 15:50:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56724
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #21 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
gcc 8 now underlines the pertinent parameter (as of r253411 and r253096 for
C/C++ respectively):
C:
$ ./xgcc -B. -c t.c
t.c: In function ‘docall’:
t.c:8:3: warning: passing argument 3 of ‘callf’ from incompatible pointer type
[-Wincompatible-pointer-types]
f);
^
t.c:3:22: note: expected ‘int (*)(double *)’ but argument is of type ‘int
(*)(int *)’
int callf (int, int, int (*)(double *));
^~~~~~~~~~~~~~~~~
C++ (which also now underlines the pertinent argument, as of r256448):
$ ./xg++ -B. -c t.c
t.c: In function ‘int docall()’:
t.c:8:3: error: invalid conversion from ‘int (*)(int*)’ to ‘int (*)(double*)’
[-fpermissive]
f);
^
t.c:3:22: note: initializing argument 3 of ‘int callf(int, int, int
(*)(double*))’
int callf (int, int, int (*)(double *));
^~~~~~~~~~~~~~~~~
More information about the Gcc-bugs
mailing list