diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a8b38dff93f..b855ceca84a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-12-19 Per Bothner + + * langhooks.c (lhd_print_error_function): Fix for PR c/13110. + Don't do pp_newline; it causes an extra blank line. + * pretty-print.c (pp_base_flush): Clear pp_needs_newline. + 2003-12-19 Jason Merrill * tree.c (get_unwidened): Decide whether to narrow a bitfield diff --git a/gcc/langhooks.c b/gcc/langhooks.c index 0e4aa2219a0..e31c1fbbd10 100644 --- a/gcc/langhooks.c +++ b/gcc/langhooks.c @@ -545,7 +545,6 @@ lhd_print_error_function (diagnostic_context *context, const char *file) (context->printer, "In function `%s':", (*lang_hooks.decl_printable_name) (current_function_decl, 2)); } - pp_newline (context->printer); diagnostic_set_last_function (context); pp_flush (context->printer); diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c index 27a77ea569e..993fde7a6d6 100644 --- a/gcc/pretty-print.c +++ b/gcc/pretty-print.c @@ -343,6 +343,7 @@ pp_base_flush (pretty_printer *pp) pp_clear_state (pp); fputc ('\n', pp->buffer->stream); fflush (pp->buffer->stream); + pp_needs_newline (pp) = false; } /* Sets the number of maximum characters per line PRETTY-PRINTER can