This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

--- 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);
     }

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]