aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/c/c-objc-common.c2
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);
}