This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error message on wrong line


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.
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]