From patchwork Thu Feb 2 19:14:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 139196 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 946C4104796 for ; Fri, 3 Feb 2012 06:14:54 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1328814894; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To: MIME-Version:Content-Type:Content-Disposition:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=HI6uWIUFhxZV/5rNAR5d qOU29xM=; b=v7BsdykgNUR00Ug7spYUDG5BMCl3U1J6RJEYjmr0wiVP4w3oHygT DBjkZ4E1PYn95vDL3WaXCVKYxqShqGJSblmk0+sNavyc37GotMLMlSZATtduK4Kg Hw40VMc8jr+gPctR6NMag4B12IjlFCGahJjBoNZAniEf+MZXCRQhosg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=UKLcjgr109L5J6B43i/ZulA4+ck/Yv/tGCwuwH0fx3ByCJU03T8sJAhT34WWzs CNpbD4uWxTY0KgEFpRXCCidCOhHCrR2PWo6VFcc1U00NYWTPSG6Kece1/ytRMALN iq3lcacVscCayeZSS61OYdNljWMvfd3+toVkIDqFe+qgQ=; Received: (qmail 11994 invoked by alias); 2 Feb 2012 19:14:49 -0000 Received: (qmail 11979 invoked by uid 22791); 2 Feb 2012 19:14:48 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Feb 2012 19:14:34 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q12JEXvq019199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 2 Feb 2012 14:14:33 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q12JEWhB024795 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Feb 2012 14:14:33 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id q12JEVIQ029323; Thu, 2 Feb 2012 20:14:31 +0100 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id q12JEVPO029321; Thu, 2 Feb 2012 20:14:31 +0100 Date: Thu, 2 Feb 2012 20:14:31 +0100 From: Jakub Jelinek To: Gabriel Dos Reis Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] 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> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 PR middle-end/48071 * diagnostic.c (diagnostic_finish): Remove trailing newlines. Jakub --- 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); }