aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-objc-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c/c-objc-common.c')
-rw-r--r--gcc/c/c-objc-common.c2
1 files changed, 2 insertions, 0 deletions
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);
}