public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/114588] New: Analyzer buffer overflow ASCII art hardcodes "RED" and "GREEN" as the terminal colors
Date: Thu, 04 Apr 2024 14:57:34 +0000 [thread overview]
Message-ID: <bug-114588-4@http.gcc.gnu.org/bugzilla/> (raw)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114588
Bug ID: 114588
Summary: Analyzer buffer overflow ASCII art hardcodes "RED" and
"GREEN" as the terminal colors
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
Target Milestone: ---
As noted by ycombinator user "ephaeton" here:
https://news.ycombinator.com/item?id=39927200
> I'd appreciate dropping red/green as bad/good colorscheme. red & green feed one of
> the most common visual impairments, and tend to work quite bad with terminal fg/bg
> colors throughout the spectrum except for its ends (black & white). Maybe you have
> some color profile descriptor somewhere that a user can change, but a quick search
> through info gcc (of my installed version) just shows the ability to turn it on &
> off (-fdiagnostics-color=[auto|never|always]).
>
> Color is definitely one of the things that do NOT work well on a wide variety of
> terminals. try a white-on-firebrick VTE, or a black-on-darkgoldenrod (awesome for
> sun-glare, btw), white-on-green, white-on-purple for a change to see how well they
> mingle...
Looking at the code, looks like I hardcoded this (in access-diagram.cc in
access_diagram_impl's ctor), rather than going through the GCC_COLORS envvar:
/* Register painting styles. */
{
style valid_style;
valid_style.m_fg_color = style::named_color::GREEN;
valid_style.m_bold = true;
m_valid_style_id = m_sm.get_or_create_id (valid_style);
style invalid_style;
invalid_style.m_fg_color = style::named_color::RED;
invalid_style.m_bold = true;
m_invalid_style_id = m_sm.get_or_create_id (invalid_style);
}
next reply other threads:[~2024-04-04 14:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 14:57 dmalcolm at gcc dot gnu.org [this message]
2024-04-04 17:31 ` [Bug analyzer/114588] " pinskia at gcc dot gnu.org
2024-04-05 18:00 ` egallager at gcc dot gnu.org
2024-04-05 18:52 ` cvs-commit at gcc dot gnu.org
2024-04-08 15:30 ` dmalcolm at gcc dot gnu.org
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=bug-114588-4@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).