On Fri, Mar 7, 2008 at 11:53 AM, Richard Guenther
<[EMAIL PROTECTED]> wrote:
> On Fri, Mar 7, 2008 at 4:54 PM, Tom Tromey <[EMAIL PROTECTED]> wrote:
>  > >>>>> "Manuel" == Manuel López-Ibáñez <[EMAIL PROTECTED]> writes:
>  >
>  >  Manuel> Here is a patch that give us caret diagnostics in C/C++.
>  >
>  >  Nice.
>  >
>  >  Manuel> The third approach would be to store an offset and when
>  >  Manuel> generating diagnostics, reopen the file, fseek to the offset
>  >  Manuel> and print that line.
>  >
>  >  I tend to favor this, provided that the performance is not too awful.
>  >  But maybe this is painful due to iconv translation?
>  >
>  >  Ian suggested that we delete this information after the FE is
>  >  finished.  This makes sense, I think, from a memory-saving
>  >  perspective.  But, that means we will get different kinds of error
>  >  output depending on when a diagnostic is emitted, which I think is
>  >  pretty unfriendly -- it exposes implementation details of gcc to the
>  >  user.
>  >
>  >  So, the reason I favor trying the reopen-and-seek approach is that it
>  >  would let us keep this information around and be consistent in what we
>  >  print.
>  >
>  >  What do you think of that?
>
>  I think we support input from stdin, at least qemu used to work that way ;)
>
>  If you want to improve the memory situation maybe storing the input
>  in compressed format in memory is ok.  (Or compressing the cpp token
>  stream if we want to support diagnostics on the preprocessed output,
>  which I'd love to have in some cases)

I would not feel bad if we don't provide caret diagnostics for `input
from stdin'.
`stdin' is already specially weird anyway :-)

Reply via email to