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: Preparatory PATCH for pretty-print


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


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