From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp001-out.apm-internet.net (smtp001-out.apm-internet.net [85.119.248.222]) by sourceware.org (Postfix) with ESMTPS id 9F4CC3858C60 for ; Thu, 2 Feb 2023 11:41:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F4CC3858C60 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=sandoe.co.uk Received: (qmail 46254 invoked from network); 2 Feb 2023 11:41:42 -0000 X-APM-Out-ID: 16753381014625 X-APM-Authkey: 257869/1(257869/1) 3 Received: from unknown (HELO smtpclient.apple) (81.138.1.83) by smtp001.apm-internet.net with SMTP; 2 Feb 2023 11:41:42 -0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.2\)) Subject: Re: [PATCH] driver, toplevel: Avoid emitting the version information twice. From: Iain Sandoe In-Reply-To: Date: Thu, 2 Feb 2023 11:41:41 +0000 Cc: GCC Patches , Joseph Myers Content-Transfer-Encoding: quoted-printable Message-Id: <069B07DC-BC64-416D-9846-08A5C624E773@sandoe.co.uk> References: <20230129113451.24516-1-iain@sandoe.co.uk> To: Richard Biener X-Mailer: Apple Mail (2.3696.120.41.1.2) X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_COUK,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > On 30 Jan 2023, at 07:48, Richard Biener = wrote: >=20 > On Sun, Jan 29, 2023 at 12:35 PM Iain Sandoe via Gcc-patches > wrote: >>=20 >> Technically, this is seems to be a regression somewhere between 4.2 = and >> 4.6 but, it seems, not enough for anyone to care too much. Tested on >> various Darwin versions and x86_64, powerpc64 linux, >> OK for trunk {now,stage1}? >=20 > This will elide the earlier printing, right?=20 Yes. > eliding the 2nd would be prefered so the info comes first? Indeed; that is better ..=20 how about this update then? OK for trunk now/stage1? =E2=80=94 8< --- For a regular compile job, with -v we emit the GCC version information twice - once from main() and once from process_options(). We do not need to output the second header. Signed-off-by: Iain Sandoe gcc/ChangeLog: * toplev.cc (toplev::main): Only print the version information = header from toplevel main(). --- gcc/toplev.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/toplev.cc b/gcc/toplev.cc index 42937f0ba00..4c15d4f542e 100644 --- a/gcc/toplev.cc +++ b/gcc/toplev.cc @@ -1358,7 +1358,7 @@ process_options (bool no_backend) option flags in use. */ if (version_flag) { - print_version (stderr, "", true); + /* We already printed the version header in main (). */ if (!quiet_flag) { fputs ("options passed: ", stderr); --=20 2.37.1 (Apple Git-137.1)