public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@gmail.com>
To: "Licht, Martin" <mlicht@UCSD.EDU>,
	"gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Re: Diagnostic format of warnings
Date: Mon, 10 Aug 2020 09:10:13 -0600	[thread overview]
Message-ID: <cc45252f-1c5c-aeb6-8b31-1b917e1d4b2e@gmail.com> (raw)
In-Reply-To: <BYAPR04MB4775FA95044270BB46EA652EB6440@BYAPR04MB4775.namprd04.prod.outlook.com>

On 8/10/20 5:51 AM, Licht, Martin via Gcc-help wrote:
> Hello,
> 
> I have got a question regarding diagnostic output in GCC.
> 
> It seems that some diagnostic messages receive a color markup on my shell whereas others don't. For example, the word "warning" is purple for -Wfloat-equal whereas for -Winline it is not.
> 
> My guess is that some warnings happen before code generation (such as -Wfloat-equal) whereas other warnings happen after code generation (such as -Winline) and thus are treated differently.
> 
> I am wondering that is the intentional default on the GCC. It seems rather arbitrary to use such different formats for warnings.

Diagnostics should be colorized regardless of when they are issued
(by the front end, during optimization, or expansion). I think I've
seen them lose color in older versions of GCC and during LTO but
I think that was fixed.  If it persists with newer versions of GCC
or happens under some other conditions we would need to see a test
case that reproduces it to say much more.

Martin

      reply	other threads:[~2020-08-10 15:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 11:51 Licht, Martin
2020-08-10 15:10 ` Martin Sebor [this message]

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=cc45252f-1c5c-aeb6-8b31-1b917e1d4b2e@gmail.com \
    --to=msebor@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=mlicht@UCSD.EDU \
    /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).