This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Don't print extra newline after message that warnings are treated as errors (PR middle-end/48071)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 2 Feb 2012 20:14:31 +0100
- Subject: [PATCH] Don't print extra newline after message that warnings are treated as errors (PR middle-end/48071)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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