* langhooks.c (lhd_print_error_function): Fix for PR c/13110.
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 Dec 2003 06:32:32 +0000 (06:32 +0000)
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 Dec 2003 06:32:32 +0000 (06:32 +0000)
Don't do pp_newline; it causes an extra blank line.
* pretty-print.c (pp_base_flush):  Clear pp_needs_newline.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74872 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/langhooks.c
gcc/pretty-print.c

index a8b38df..b855cec 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        * tree.c (get_unwidened): Decide whether to narrow a bitfield
index 0e4aa22..e31c1fb 100644 (file)
@@ -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);
index 27a77ea..993fde7 100644 (file)
@@ -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