summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r--gcc/diagnostic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index 48ba2968f3b..fb81bbd89c1 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -93,7 +93,7 @@ diagnostic_initialize (diagnostic_context *context)
{
/* Allocate a basic pretty-printer. Clients will replace this a
much more elaborated pretty-printer if they wish. */
- context->printer = xmalloc (sizeof (pretty_printer));
+ context->printer = XNEW (pretty_printer);
pp_construct (context->printer, NULL, 0);
/* By default, diagnostics are sent to stderr. */
context->printer->buffer->stream = stderr;