This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56723] New: wrong location in error message
- From: "tromey at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Mar 2013 18:40:20 +0000
- Subject: [Bug c++/56723] New: wrong location in error message
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56723
Bug #: 56723
Summary: wrong location in error message
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 file:
int f (int *);
int callf (int, int, int (*)(double *));
int docall(void)
{
return callf (23, 72,
f);
}
Compiling this with g++ yields:
t.cc: In function âint docall()â:
t.cc:8:4: error: invalid conversion from âint (*)(int*)â to âint (*)(double*)â
[-fpermissive]
f);
^
t.cc:3:5: error: initializing argument 3 of âint callf(int, int, int
(*)(double*))â [-fpermissive]
int callf (int, int, int (*)(double *));
^
Note that "8:4" location.
I think this is slightly off.
The C compiler gets it ok:
barimba. gcc -g --syntax-only t.c
t.c: In function âdocallâ:
t.c:8:3: warning: passing argument 3 of âcallfâ from incompatible pointer type
[enabled by default]
(etc)