This is the mail archive of the gcc-patches@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: C++ PATCH: Fix annoying space in formatting


On Sun, 27 Jun 2004 16:33:14 -0500 (CDT), Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:

> On Sun, 27 Jun 2004, Richard Henderson wrote:
>
> | On Sun, Jun 27, 2004 at 10:24:53AM -0500, Gabriel Dos Reis wrote:
> | > The long term solution, of course, is to
> | > rewrite cp/error.c in terms of the new pretty-printer.
> |
> | How about rewriting the pretty printer such that it shares the bulk
> | of its code in tree-pretty-print.c?
>
> The new pretty-printer was being rewritten when cp/error.c was
> somehow copied and edited to produce tree-pretty-print.c.

It wasn't.  AFAIK tree-pretty-print was written from scratch.

I had a patch long ago to improve it by copying over some code from
cp/error.c, which I sent to you and another guy in hope that someone would
finish the job of making the pretty printer more useful.  As I recall, the
purpose of that patch was to fix the printing of complex C types (arrays,
functions), which the current code doesn't really attempt to get right.

Since then I've been watching while you built this grand pretty-printing
edifice, which is very nice and elegant, but so far it hasn't paid off in
terms of actually fixing the glaring shortcomings of tree-pretty-print.

> Yes, at some point they should share code, but there was no
> way for me to stop that error to happen (in time).  The long-term
> solution for cp/error.c is to use cp/cxx-pretty-print.c. I suppose
> the same will happen for tree-pretty-print.c and c-pretty-print.c.

Is there any way for me to convince you to make the conversion of
tree-pretty-print a higher priority?  Its major usability flaw for me is
that I can't just feed it an arbitrary tree node and have it do something
sensible with it, because it doesn't know about frontend nodes.  I imagine
some sort of langhook is called for, instead of separate entry points for C
and GENERIC tree nodes.

cp/error.c seems to me like a much lower priority, because it already does
its job.

Jason


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