If you dont want to mess with gcc flags in all your projects, add the GCC_COLORS env variable to your shell, like just export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'` to your ~/.bashrc or other shell rc.