public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/114588] New: Analyzer buffer overflow ASCII art hardcodes "RED" and "GREEN" as the terminal colors
@ 2024-04-04 14:57 dmalcolm at gcc dot gnu.org
  2024-04-04 17:31 ` [Bug analyzer/114588] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2024-04-04 14:57 UTC (permalink / raw)
  To: gcc-bugs

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);
    }

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-08 15:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-04 14:57 [Bug analyzer/114588] New: Analyzer buffer overflow ASCII art hardcodes "RED" and "GREEN" as the terminal colors dmalcolm at gcc dot gnu.org
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

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).