Commit 7b330e08 by Per Bothner Committed by Per Bothner

re PR c/13110 (error message includes extra blank line)


	* 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.

From-SVN: r74872
parent f3da0ead
2003-12-19 Per Bothner <per@bothner.com>
* 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 <jason@redhat.com> 2003-12-19 Jason Merrill <jason@redhat.com>
* tree.c (get_unwidened): Decide whether to narrow a bitfield * tree.c (get_unwidened): Decide whether to narrow a bitfield
......
...@@ -545,7 +545,6 @@ lhd_print_error_function (diagnostic_context *context, const char *file) ...@@ -545,7 +545,6 @@ lhd_print_error_function (diagnostic_context *context, const char *file)
(context->printer, "In function `%s':", (context->printer, "In function `%s':",
(*lang_hooks.decl_printable_name) (current_function_decl, 2)); (*lang_hooks.decl_printable_name) (current_function_decl, 2));
} }
pp_newline (context->printer);
diagnostic_set_last_function (context); diagnostic_set_last_function (context);
pp_flush (context->printer); pp_flush (context->printer);
......
...@@ -343,6 +343,7 @@ pp_base_flush (pretty_printer *pp) ...@@ -343,6 +343,7 @@ pp_base_flush (pretty_printer *pp)
pp_clear_state (pp); pp_clear_state (pp);
fputc ('\n', pp->buffer->stream); fputc ('\n', pp->buffer->stream);
fflush (pp->buffer->stream); fflush (pp->buffer->stream);
pp_needs_newline (pp) = false;
} }
/* Sets the number of maximum characters per line PRETTY-PRINTER can /* Sets the number of maximum characters per line PRETTY-PRINTER can
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment