diff options
author | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2013-08-23 23:58:55 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2013-08-23 23:58:55 +0000 |
commit | 025311c4bb3ae9f00c9f4f73fecb183f07b5e93b (patch) | |
tree | 3fd8ea19c4717cf8eebfaba2c148f1eec5f4ed57 /gcc/c | |
parent | 0cadbfaa89805ce4d1b93bed04c10d7c7bf1f6e2 (diff) | |
download | gcc-025311c4bb3ae9f00c9f4f73fecb183f07b5e93b.zip gcc-025311c4bb3ae9f00c9f4f73fecb183f07b5e93b.tar.gz gcc-025311c4bb3ae9f00c9f4f73fecb183f07b5e93b.tar.bz2 |
diagnostic.c (diagnostic_set_caret_max_width): Use pp_buffer.
* diagnostic.c (diagnostic_set_caret_max_width): Use pp_buffer.
* gimple-pretty-print.c (gimple_dump_bb_buff): Likewise.
* pretty-print.c (pp_formatted_text_data): Likewise.
(pp_write_text_to_stream): Likewise.
(pp_write_text_as_dot_label_to_stream): Likewise.
(pp_append_r): Likewise.
(pp_format): Likewise.
(pp_flush): Likewise.
(pp_clear_output_area): Likewise.
(pp_append_text): Likewise.
(pp_formatted_text): Likewise.
(pp_remaining_character_count_for_line): Likewise.
(pp_newline): Likewise.
(pp_character): Likewise.
(output_buffer::~output_buffer): Define.
(pretty_printer::~pretty_printer): Destruct output buffer.
* pretty-print.h (output_buffer::~output_buffer): Declare.
(pretty_printer::~pretty_printer): Declare virtual.
c/
* c-objc-common.c (c_tree_printer): Document the nature of the cast.
(c_initialize_diagnostics): Call a destructor for the early printer.
cp/
* cp-objcp-common.c (cxx_initialize_diagnostics): Call a
destructor for the early printer.
* error.c (type_to_string): Use pp_buffer.
From-SVN: r201956
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c/c-objc-common.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index b0b25ac..574e7c0 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,8 @@ +2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * c-objc-common.c (c_tree_printer): Document the nature of the cast. + (c_initialize_diagnostics): Call a destructor for the early printer. + 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net> * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty diff --git a/gcc/c/c-objc-common.c b/gcc/c/c-objc-common.c index 978c432..421c452 100644 --- a/gcc/c/c-objc-common.c +++ b/gcc/c/c-objc-common.c @@ -92,6 +92,7 @@ c_tree_printer (pretty_printer *pp, text_info *text, const char *spec, { tree t = NULL_TREE; tree name; + // FIXME: the next cast should be a dynamic_cast, when it is permitted. c_pretty_printer *cpp = (c_pretty_printer *) pp; pp->padding = pp_none; @@ -192,6 +193,7 @@ c_initialize_diagnostics (diagnostic_context *context) context->printer = new (pp) c_pretty_printer (); /* It is safe to free this object because it was previously XNEW()'d. */ + base->~pretty_printer (); XDELETE (base); } |