This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: feature request
- From: "Sam Lauber" <sam124 at operamail dot com>
- To: "Luca Benini" <lbenini at csr dot unibo dot it>, gcc at gcc dot gnu dot org
- Date: Thu, 18 Nov 2004 03:42:53 +0100
- Subject: Re: feature request
That's a bit hard because you have to skip right to that line, and lseek() and friends can't precisely seek to line X. We'd have to use a lot of code to figure out how long each line is, and go to that exact line. But I think this code would maybe work for making the error:
void semicolon_error
(unsigned long line)
{
unsigned long c_cnt, l_cnt;
for (c_cnt = 0, l_cnt = 0; l_cnt = line; )
{
while (getchar() != '\n')
c_cnt++;
l_cnt++
}
char c;
while ((c = (char) getchar()) != '\n');
printf("%lu: missing semicolon at end of line\n", line);
printf("%lu: %c\n", line, c);
}
But wouldn't it be easier just to go back to the original idea that I had of saying "XX: no semicolon at end of line"?
Samuel Lauber
----- Original Message -----
From: "Luca Benini" <lbenini@csr.unibo.it>
To: "Ian Lance Taylor" <ian@wasabisystems.com>
Subject: Re: feature request
Date: Wed, 17 Nov 2004 08:43:09 +0100
>
> Ian Lance Taylor wrote:
>
> > context. You might have to parse the messages a bit to pick out the
> > directory in which to find the file, but I doubt that would be all
> > that difficult.
>
> Well there's another way (i think), extracting the gcc code for
> commandline parsing and for output formatting we (I?) can create a
> library useful for generic gcc wrapper.
> Now i have to complete the scripts for gcc mirrors check (i hate http
> ;-)), but if you think this library can be completed in a reasonable
> time, it will be useful can you count me for dev.
>
>
> Luca Benini
>
>
--
_____________________________________________________________
Web-based SMS services available at http://www.operamail.com.
From your mailbox to local or overseas cell phones.
Powered by Outblaze