This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/56724] sub-optimal location in error
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Jan 2018 15:50:07 +0000
- Subject: [Bug c/56724] sub-optimal location in error
- Auto-submitted: auto-generated
- References: <bug-56724-4@http.gcc.gnu.org/bugzilla/>
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 *));
^~~~~~~~~~~~~~~~~