Lénaïc Bagnères, lenaicb@singularity.fr
Personnal website
Cute duck

iconDebian GNU/Linux

iconGCC 4.9 Colorized Output (2012)

After GCC 4.9, GCC is colorized by default (depends of the terminal output).

Add these lines in ~/.profile file:

# Colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

If you do not want to restart now, you can use this command in the current terminal:

source ~/.profile

Source: Stack Overflow - Improving g++ output