Bug 983186 - TERM=dumb doesn't turn off gcc colorful output
TERM=dumb doesn't turn off gcc colorful output
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2013-07-11 16:52:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
gcc-4.8.1-1.fc19.x86_64
emacs-24.2-18.fc19.x86_64
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.