Bug 983186 - TERM=dumb doesn't turn off gcc colorful output
TERM=dumb doesn't turn off gcc colorful output
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-07-10 12:18 EDT by Lennart Poettering
Modified: 2013-07-11 16:52 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-11 16:52:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lennart Poettering 2013-07-10 12:18:56 EDT
When TERM=dumb is set (like emacs does it when invoking M-x compile) then gcc's new color output is not turned off. It really should, as dumb terminals like that can't handle colors and output looks awful in emacs then.

gcc should automatically turn off color output if TERM=dumb is set.
Comment 1 Lennart Poettering 2013-07-10 12:19:21 EDT
Comment 2 Jakub Jelinek 2013-07-11 13:28:56 EDT
???  I see TERM=dumb definitely disabling colors in gcc, unless you force them on through -fdiagnostics-color or -fdiagnostics-color=always (both options the same).  The default right now is -fdiagnostics-color=auto if GCC_COLORS is in environment and non-empty, otherwise -fdiagnostics-color=never, and I'm contemplating just making -fdiagnostics-color=auto the default unconditionally.
Still TERM=dumb disables the colors in that case.
So are you sure you are using TERM=dumb and not some other TERM name?
Comment 3 Lennart Poettering 2013-07-11 16:52:02 EDT
Oh! Sorry for the confusion. Somebody added -fdiagnostics-color=always to our project, and I wasn't aware. Changed that now to =auto, and things work now. Sorry for the confusion!

Note You need to log in before you can comment on or make changes to this bug.