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.
gcc-4.8.1-1.fc19.x86_64 emacs-24.2-18.fc19.x86_64
??? 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!