This is the mail archive of the
mailing list for the GCC project.
Re: Where did output_add_string go?
Diego Novillo <email@example.com> writes:
| On Mon, 2003-08-18 at 17:49, Gabriel Dos Reis wrote:
| > | The old function took as argument a FILE * and the tree node to print
| > | (assumed to be a C _STMT node).
| > after pp_construct() and pp_c_pretty_printer_init(), set
| > pp_base (printer)->stream to that argument.
| Hmm, I was hoping to re-use whatever object is initialized by
c_initialize_diagnostics only initializes the global diagnostic context
| All that malloc/free/memcpy activity to print
| a single node doesn't sound appealing.
You're right on the account that that piece is no good. There should
be a fonction to take care of all that.
But you should not have to construct c_pretty_printer object each time
you want to print a node in a given run. You construct one at the
start and you reuse it.
| Could I (ab)use global_dc for this? (it's not all that appealing either).
You may, but then you'll have diagnostics and all pretty-printing
things go on the same FILE *.