[Bug c/56724] sub-optimal location in error

tromey at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 15 15:50:00 GMT 2014


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

--- Comment #5 from Tom Tromey <tromey at gcc dot gnu.org> ---
I tried this today with a recent-ish gcc trunk build, and
there's been a regression.

Now:

barimba. gcc --syntax-only r.c
r.c: In function ‘docall’:
r.c:7:10: warning: passing argument 3 of ‘callf’ from incompatible pointer type
   return callf (23, 72,
          ^
r.c:3:5: note: expected ‘int (*)(double *)’ but argument is of type ‘int
(*)(int *)’
 int callf (int, int, int (*)(double *));
     ^


Note how the first warning now points to "callf", whereas
in comment #0 it pointed to the actual argument causing the diagnostic.

The new situation is much worse for me as it prevents automated
rewriting...


More information about the Gcc-bugs mailing list