re PR middle-end/56461 (GCC is leaking lots of memory)
PR middle-end/56461 * diagnostic.c (diagnostic_append_note): Save and restore old prefix. From-SVN: r196445
This commit is contained in:
parent
48c414032a
commit
4432aa6c81
@ -1,3 +1,8 @@
|
||||
2013-03-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/56461
|
||||
* diagnostic.c (diagnostic_append_note): Save and restore old prefix.
|
||||
|
||||
2013-03-04 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
* tree-dfa.c (get_or_create_ssa_default_def): Use parameter fn in
|
||||
|
@ -828,6 +828,7 @@ diagnostic_append_note (diagnostic_context *context,
|
||||
{
|
||||
diagnostic_info diagnostic;
|
||||
va_list ap;
|
||||
const char *saved_prefix;
|
||||
|
||||
va_start (ap, gmsgid);
|
||||
diagnostic_set_info (&diagnostic, gmsgid, &ap, location, DK_NOTE);
|
||||
@ -836,12 +837,14 @@ diagnostic_append_note (diagnostic_context *context,
|
||||
va_end (ap);
|
||||
return;
|
||||
}
|
||||
saved_prefix = pp_get_prefix (context->printer);
|
||||
pp_set_prefix (context->printer,
|
||||
diagnostic_build_prefix (context, &diagnostic));
|
||||
pp_newline (context->printer);
|
||||
pp_format (context->printer, &diagnostic.message);
|
||||
pp_output_formatted_text (context->printer);
|
||||
pp_destroy_prefix (context->printer);
|
||||
pp_set_prefix (context->printer, saved_prefix);
|
||||
diagnostic_show_locus (context, &diagnostic);
|
||||
va_end(ap);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user