From patchwork Tue Apr 9 07:21:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1081960 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-498999-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="cr9e4nOK"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44ddyC2zkTz9sRJ for ; Tue, 9 Apr 2019 17:21:34 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=XgqjVicrzsZ8paVDeUf4vlhfBo6rN iYtNNz0H87X1x0XwCef4i0khH8aQPVFpilqZZbvep0ehXTj68UUoMIiSCuxK22oq 2ufyRq43gtlQ32SbEFtrCZ7byBtrkoQ6fe2mT1lR0/sjDY2gCAu9X1bGmzA6JiaY dm09pS0faJfTqg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=tn1sTe6WDpdKaIDUJfIEIQPxCnk=; b=cr9 e4nOKbTe3r/2e4zRgzkfTjvT88O66RMjnyfxuK4k0oH+tkFRSJe/wfAIPUMS0D1O 3qgdKmCFu8bXWsPP+Fd+ajcVHQupbp3Ij7gbU7q7iQWTQO6VqYponyahBUxCk/Mw w9MUNx1DJGQXQbHd24pPMjm+IKVhBNFZwEzb03Qg= Received: (qmail 59206 invoked by alias); 9 Apr 2019 07:21:27 -0000 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 Received: (qmail 59197 invoked by uid 89); 9 Apr 2019 07:21:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 Apr 2019 07:21:25 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 66B4F3082291; Tue, 9 Apr 2019 07:21:24 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.40.205.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C860010018F9; Tue, 9 Apr 2019 07:21:23 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id x397LLo4016257; Tue, 9 Apr 2019 09:21:21 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x397LJFP016256; Tue, 9 Apr 2019 09:21:19 +0200 Date: Tue, 9 Apr 2019 09:21:19 +0200 From: Jakub Jelinek To: Richard Biener , Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Remove some further trailing whitespaces from diagnostic messages (PR translation/90011) Message-ID: <20190409072119.GK21066@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.11.3 (2019-02-01) X-IsSubscribed: yes Hi! Several further spots with trailing whitespace, only bootstrapped/regtested on x86_64-linux and i686-linux (so the ipa-devirt.c change is covered), the rest is just by eyeballing gcc.pot. Ok for trunk? I wonder where and how we could check for this kind of errors, unfortunately the strings are extracted by xgettext which we can't easily patch for our purposes (say to emit warnings about "word" "another word" or "word " " another word" or for this trailing whitespace (this one could be done even on gcc.pot itself by looking for ' "\nmsgstr', but unfortunately we have various cases where we intentionally do want those: one category is usually when it ends with ": ", like: msgid "invalid 'asm': " msgstr "" (many cases), but there are even "Go ahead? (y or n) " msgstr "" or msgid "The following options are specific to just the language " msgstr "" "%s\tcompiled by GNU C version %s, " msgstr "" msgid "vtable for " msgstr "" msgid "%r%s:%d:%d:%R " msgstr "" etc., so it is hard to do this programmatically, unless we had some white list. 2019-04-09 Jakub Jelinek PR translation/90011 * ipa-devirt.c (compare_virtual_tables): Remove two trailing spaces from diagnostics. * config/arm/freebsd.h (LINK_SPEC): Remove trailing space from -p diagnostics. * config/riscv/freebsd.h (LINK_SPEC): Likewise. * config/aarch64/aarch64-freebsd.h (FBSD_TARGET_LINK_SPEC): Likewise. * config/darwin.h (DRIVER_SELF_SPECS, ASM_FINAL_SPEC): Remove trailing space from -gsplit-dwarf diagnostics. Jakub --- gcc/ipa-devirt.c.jj 2019-03-08 11:52:17.000000000 +0100 +++ gcc/ipa-devirt.c 2019-04-08 21:31:32.903689600 +0200 @@ -874,7 +874,7 @@ compare_virtual_tables (varpool_node *pr (TYPE_NAME (DECL_CONTEXT (vtable->decl))), OPT_Wodr, "virtual table of type %qD violates " - "one definition rule ", + "one definition rule", DECL_CONTEXT (vtable->decl))) { inform (DECL_SOURCE_LOCATION --- gcc/config/arm/freebsd.h.jj 2019-01-01 12:37:28.089795586 +0100 +++ gcc/config/arm/freebsd.h 2019-04-08 21:26:40.917347492 +0200 @@ -46,7 +46,7 @@ #undef LINK_SPEC #define LINK_SPEC " \ - %{p:%nconsider using `-pg' instead of `-p' with gprof (1) } \ + %{p:%nconsider using `-pg' instead of `-p' with gprof (1)} \ %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ %{shared:-Bshareable %{h*} %{soname*}} \ --- gcc/config/riscv/freebsd.h.jj 2019-01-01 12:37:30.086762821 +0100 +++ gcc/config/riscv/freebsd.h 2019-04-08 21:25:48.212188263 +0200 @@ -41,7 +41,7 @@ along with GCC; see the file COPYING3. #undef LINK_SPEC #define LINK_SPEC " \ -melf" XLEN_SPEC "lriscv \ - %{p:%nconsider using `-pg' instead of `-p' with gprof (1) } \ + %{p:%nconsider using `-pg' instead of `-p' with gprof (1)} \ %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ %{shared:-Bshareable %{h*} %{soname*}} \ --- gcc/config/aarch64/aarch64-freebsd.h.jj 2019-01-01 12:37:38.460625430 +0100 +++ gcc/config/aarch64/aarch64-freebsd.h 2019-04-08 21:26:16.311740011 +0200 @@ -34,7 +34,7 @@ #undef FBSD_TARGET_LINK_SPEC #define FBSD_TARGET_LINK_SPEC " \ - %{p:%nconsider using `-pg' instead of `-p' with gprof (1) } \ + %{p:%nconsider using `-pg' instead of `-p' with gprof (1)} \ %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ %{shared:-Bshareable %{h*} %{soname*}} \ --- gcc/config/darwin.h.jj 2019-01-01 12:37:22.137893242 +0100 +++ gcc/config/darwin.h 2019-04-08 21:25:15.260713922 +0200 @@ -123,7 +123,7 @@ extern GTY(()) int darwin_ms_struct; "%{gused:-g -feliminate-unused-debug-symbols} %