diff mbox

Don't print extra newline after message that warnings are treated as errors (PR middle-end/48071)

Message ID 20120202191431.GB18768@tyan-ft48-01.lab.bos.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Feb. 2, 2012, 7:14 p.m. UTC
Hi!

pp_flush already adds a newline, so we shouldn't add it in pp_verbatim
as well, that results in printing a blank newline after this message.

Bootstrapped/regtested onx x86_64-linux and i686-linux, ok for trunk?

2012-02-02  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/48071
	* diagnostic.c (diagnostic_finish): Remove trailing newlines.


	Jakub

Comments

Gabriel Dos Reis Feb. 2, 2012, 8:04 p.m. UTC | #1
On Thu, Feb 2, 2012 at 1:14 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> pp_flush already adds a newline, so we shouldn't add it in pp_verbatim
> as well, that results in printing a blank newline after this message.
>
> Bootstrapped/regtested onx x86_64-linux and i686-linux, ok for trunk?

Yes! Thanks for catching this.

-- Gaby
diff mbox

Patch

--- gcc/diagnostic.c.jj	2011-10-17 22:27:42.000000000 +0200
+++ gcc/diagnostic.c	2012-02-02 15:05:51.578520230 +0100
@@ -133,12 +133,12 @@  diagnostic_finish (diagnostic_context *c
       /* -Werror was given.  */
       if (context->warning_as_error_requested)
 	pp_verbatim (context->printer,
-		     _("%s: all warnings being treated as errors\n"),
+		     _("%s: all warnings being treated as errors"),
 		     progname);
       /* At least one -Werror= was given.  */
       else
 	pp_verbatim (context->printer,
-		     _("%s: some warnings being treated as errors\n"),
+		     _("%s: some warnings being treated as errors"),
 		     progname);
       pp_flush (context->printer);
     }