public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iain@sandoe.co.uk>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Joseph Myers <joseph@codesourcery.com>
Subject: Re: [PATCH] driver, toplevel: Avoid emitting the version information twice.
Date: Thu, 2 Feb 2023 11:41:41 +0000	[thread overview]
Message-ID: <069B07DC-BC64-416D-9846-08A5C624E773@sandoe.co.uk> (raw)
In-Reply-To: <CAFiYyc3bBpshS4f6O7_fX_uNwQmaYbuDbaYyEO3NbG_Cb5zmUg@mail.gmail.com>



> On 30 Jan 2023, at 07:48, Richard Biener <richard.guenther@gmail.com> wrote:
> 
> On Sun, Jan 29, 2023 at 12:35 PM Iain Sandoe via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
>> 
>> 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}?
> 
> This will elide the earlier printing, right? 

Yes.

> eliding the 2nd would be prefered so the info comes first?

Indeed; that is better .. 

how about this update then?
OK for trunk now/stage1?

— 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 <iain@sandoe.co.uk>

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);
-- 
2.37.1 (Apple Git-137.1)



  reply	other threads:[~2023-02-02 11:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-29 11:34 Iain Sandoe
2023-01-30  7:48 ` Richard Biener
2023-02-02 11:41   ` Iain Sandoe [this message]
2023-02-02 13:31     ` Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=069B07DC-BC64-416D-9846-08A5C624E773@sandoe.co.uk \
    --to=iain@sandoe.co.uk \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).