Red Hat Bugzilla – Bug 983186
TERM=dumb doesn't turn off gcc colorful output
Last modified: 2013-07-11 16:52:02 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.
??? 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?
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!