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