[Bug c/56724] New: sub-optimal location in error
tromey at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 25 18:43:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56724
Bug #: 56724
Summary: sub-optimal location in error
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: tromey@gcc.gnu.org
Consider this source:
int f (int *);
int callf (int, int, int (*)(double *));
int docall(void)
{
return callf (23, 72,
f);
}
Compiling this, I get:
t.c: In function ‘docall’:
t.c:8:3: warning: passing argument 3 of ‘callf’ from incompatible pointer type
[enabled by default]
f);
^
t.c:3:5: note: expected ‘int (*)(double *)’ but argument is of type ‘int
(*)(int *)’
int callf (int, int, int (*)(double *));
^
I think the location "3:5" is not ideal.
It would be better, at least IMO, if it pointed to the particular
parameter in the declaration.
If you have many parameters, it can be hard to find the right one.
More information about the Gcc-bugs
mailing list