This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Preparatory PATCH for pretty-print
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Pop Sébastian <pop at gauvain dot u-strasbg dot fr>
- Cc: Devang Patel <dpatel at apple dot com>, gcc-patches at gcc dot gnu dot org
- Date: 01 Aug 2002 01:41:22 +0200
- Subject: Re: Preparatory PATCH for pretty-print
- Organization: CodeSourcery, LLC
- References: <116916F9-A354-11D6-A35F-00039310EDEA@> <m3it2yvxbn.fsf@soliton.integrable-solutions.net> <20020731220151.GA12995@gauvain.u-strasbg.fr>
Pop Sébastian <pop@gauvain.u-strasbg.fr> writes:
[...]
| 2. Another feature, similar to the previous one, is dumping the right name
| for enum elements.
I added a code attempting to do that -- have a look at pp_c_enumerator().
| This could improve readability of pretty-printed dumps.
| (do you have something that does that in diagnostics files ?)
cp/error.c contains a code to that effect.
[...]
| 5. Make pretty printers output compilable.
I'm not sure this is doable, even in GNU C/C++. For example, a
FILE_STMT says basically something like
__FILE__ = "a-new-file-name";
but then __FILE__ is not assignable. The only way to change its value
is to use the #line preprocessor directive; but the FILE_STMT does not
record a value for __LINE__.
Another examples include things like WRAPPER (in the C++ front-end) or
SRCLOC expressions... I'm not talking of the nightmarre SAVE_EXPR.
But I'm trying to make the output as C/C++ as possible :-)
-- Gaby