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: feature request


"Sam Lauber" <sam124@operamail.com> writes:

> Wrapper program? That wouldn't exactly be a simple programming job
> because I would probably have to duplicate all the source-file
> reading (or at least parsing) code from GCC. I would also have to
> make the warnings in the exact same format that GCC uses. Which just
> the line wrap seems hard.

gcc generates error and warning messages in a very predictable format.
That is how IDEs can handle it.  You don't have to do any source-file
parsing.  You just have to look for FILENAME:LINENO pairs in the
output, and then open the file, read ahead to the line, and dump
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.

It's not like it would be all that much easier for gcc to do this
itself.  gcc doesn't keep the source file in memory after it has been
parsed.

Ian

> ----- Original Message -----
> From: "Ian Lance Taylor" <ian@wasabisystems.com>
> To: "Luca Benini" <lbenini@csr.unibo.it>
> Subject: Re: feature request
> Date: 16 Nov 2004 13:27:03 -0500
> 
> > 
> > Luca Benini <lbenini@csr.unibo.it> writes:
> > 
> > > Joe Buck wrote:
> > > > That would be really ugly for those of us that use gcc from an IDE
> > > 
> > > But a little flag? something like -Wiwanteyecandyoutput ?
> > > During long compiling session in console (make) this feature can be
> > > useful or not?
> > 
> > How about first writing and contributing a little wrapper program that
> > you pipe gcc stderr through?  Then maybe we could add a gcc option
> > which automatically invoked that program on stderr.


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