This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A question about tree-pretty-printing
- From: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- To: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- Cc: Jason Merrill <jason at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 28 Jun 2004 10:36:00 +0200
- Subject: Re: A question about tree-pretty-printing
jason@redhat.com said:
>> Do front-ends expect a pretty-printing close to the source language
>> (e.g. Ada, C, C++, Fortran, Java, ...) or do they expect someting
>> close to C?
> For error messages, I'm sure they want something as close to the
> source as possible. For tree-pretty-print, I think should generate
> something C-like.
Yes reading this make me wonder if the best thing to do is not often
to just show the actual line of code (all the more that now -- or
soon -- line and column information is available). For C++ and
templated code, instead of showing the full function call
with all types expanded, it would be nice to see the actual line
of code and a trace of the template parameters and typedefs...
That does not remove the need for tree-pretty-printing but might
improve the error messages.
Caveat: the line information should be 100% sure for doing this.
Am I overlooking some difficulty ?
--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
--------------------------------------------------------------------