Bug 983186 - TERM=dumb doesn't turn off gcc colorful output
Summary: TERM=dumb doesn't turn off gcc colorful output
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-10 16:18 UTC by Lennart Poettering
Modified: 2013-07-11 20:52 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-07-11 20:52:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lennart Poettering 2013-07-10 16:18:56 UTC
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 16:19:21 UTC
gcc-4.8.1-1.fc19.x86_64
emacs-24.2-18.fc19.x86_64

Comment 2 Jakub Jelinek 2013-07-11 17:28:56 UTC
???  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 20:52:02 UTC
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.