This is the mail archive of the
mailing list for the GCC project.
Re: [Ada PATCH] Clean-up Ada front-end use of TREE_OVERFLOW
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, <gcc-patches at gcc dot gnu dot org>
- Date: 16 May 2005 11:08:56 +0200
- Subject: Re: [Ada PATCH] Clean-up Ada front-end use of TREE_OVERFLOW
- References: <Pine.LNX.email@example.com>
Roger Sayle <firstname.lastname@example.org> writes:
| On 16 May 2005, Gabriel Dos Reis wrote:
| > The changes look OK, with the caveat that the pretty_printer object
| > should probably be constructed as part of gnat1 startup
| > initialization, instead of waiting for the first call to abort where
| > the compiler is already in a unspeakable state.
| > The C and C++ front-end, for example, uses a global pretty-printer
| > object that is initialized in toplev.c:general_init(). I have no idea
| > whether toplev.c is included in gnat1 or not. If yes, then maybe you
| > might consider using the global_dc object.
| Ah, ok, that makes sense. This is a revision of the previous patch
| that reuses the global global_dc->printer pretty_printer rather than
| construct a local one. I was originally following the examples set
| by tree-mudflap.c:mf_varname_tree and c-pretty-print.c:print_c_tree
| which both call pp_construct to create local pretty_printers guarded
| by a static variable.
Yes, I knew those weren't "right" :-/
| But your comments about internal_error using
| a pre-constructed pretty-printer (such as reusing global_dc's) during
| fatal error processing makes a lot of sense.
| The following patch has been tested on i686-pc-linux-gnu with a "make",
| including Ada, and regression tested with a "make check-gnat" and
| confirming in acats.log that error messages in the gnat bug boxes
| are correctly formatted.
| Ok for mainline (Gaby and Richard K)?
Yes (for the part I'm concerned with :-))