* error message on wrong line
@ 2002-12-12 13:34 Graeme Peterson
2002-12-13 1:31 ` Neil Booth
0 siblings, 1 reply; 3+ messages in thread
From: Graeme Peterson @ 2002-12-12 13:34 UTC (permalink / raw)
To: gcc
Hi.
Consider the following:
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hi!\n");
asdfasdf
return(0);
}
Gcc gives the following error:
$ gcc hi.c
hi.c: In function `main':
hi.c:10: `asdfasdf' undeclared (first use in this function)
hi.c:10: (Each undeclared identifier is reported only once
hi.c:10: for each function it appears in.)
hi.c:10: parse error before "return"
But the error is on line 6. We have an IDE that invokes gcc, and based on
the error message, we highlight the wrong line. I have briefly looked at
it, and I can see where the "undeclared" error message is happening, but I
have not yet found where the line number is being set wrong.
Anyone? Any help on this is much appreciated.
Thanks.
GP
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: error message on wrong line
2002-12-12 13:34 error message on wrong line Graeme Peterson
@ 2002-12-13 1:31 ` Neil Booth
2002-12-13 8:26 ` Graeme Peterson
0 siblings, 1 reply; 3+ messages in thread
From: Neil Booth @ 2002-12-13 1:31 UTC (permalink / raw)
To: Graeme Peterson; +Cc: gcc
Graeme Peterson wrote:-
> Gcc gives the following error:
>
> $ gcc hi.c
> hi.c: In function `main':
> hi.c:10: `asdfasdf' undeclared (first use in this function)
> hi.c:10: (Each undeclared identifier is reported only once
> hi.c:10: for each function it appears in.)
> hi.c:10: parse error before "return"
>
> But the error is on line 6. We have an IDE that invokes gcc, and based on
> the error message, we highlight the wrong line. I have briefly looked at
> it, and I can see where the "undeclared" error message is happening, but I
> have not yet found where the line number is being set wrong.
>
> Anyone? Any help on this is much appreciated.
You should file a GNATS PR. I doubt it is easily fixed; when we replace
the parsers these things have a chance of improving.
Neil.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: error message on wrong line
2002-12-13 1:31 ` Neil Booth
@ 2002-12-13 8:26 ` Graeme Peterson
0 siblings, 0 replies; 3+ messages in thread
From: Graeme Peterson @ 2002-12-13 8:26 UTC (permalink / raw)
To: Neil Booth; +Cc: gcc
Thanks, Neil. Will do.
Cheers.
GP
On Fri, 13 Dec 2002, Neil Booth wrote:
> Graeme Peterson wrote:-
>
> > Gcc gives the following error:
> >
> > $ gcc hi.c
> > hi.c: In function `main':
> > hi.c:10: `asdfasdf' undeclared (first use in this function)
> > hi.c:10: (Each undeclared identifier is reported only once
> > hi.c:10: for each function it appears in.)
> > hi.c:10: parse error before "return"
> >
> > But the error is on line 6. We have an IDE that invokes gcc, and based on
> > the error message, we highlight the wrong line. I have briefly looked at
> > it, and I can see where the "undeclared" error message is happening, but I
> > have not yet found where the line number is being set wrong.
> >
> > Anyone? Any help on this is much appreciated.
>
> You should file a GNATS PR. I doubt it is easily fixed; when we replace
> the parsers these things have a chance of improving.
>
> Neil.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-13 15:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-12 13:34 error message on wrong line Graeme Peterson
2002-12-13 1:31 ` Neil Booth
2002-12-13 8:26 ` Graeme Peterson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).