aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2014-12-04 23:09:41 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2014-12-04 23:09:41 +0000
commit97aa8bb6e20579f382357ffaa8f7233133fc1e7c (patch)
tree4ed8367e62b4ba4d6028e2ffb5d23560f80d3d52 /gcc/toplev.c
parent87aca3a6aed5f33bc3ead975e96ed8db80c45cd6 (diff)
downloadgcc-97aa8bb6e20579f382357ffaa8f7233133fc1e7c.zip
gcc-97aa8bb6e20579f382357ffaa8f7233133fc1e7c.tar.gz
gcc-97aa8bb6e20579f382357ffaa8f7233133fc1e7c.tar.bz2
diagnostic.c (diagnostic_color_init): New.
gcc/ChangeLog: 2014-12-04 Manuel López-Ibáñez <manu@gcc.gnu.org> * diagnostic.c (diagnostic_color_init): New. * diagnostic.h: Declare. * gcc.c (driver::global_initializations): Use it. (driver_handle_option): Handle -fdiagnostics-color_. * toplev.c: Do not include diagnostic-color.h. (process_options): Do not initialize color diagnostics here. * common.opt (fdiagnostics-color=): Add Driver. * opts-global.c (init_options_once): Initialize color here. * opts.c (common_handle_option): Use diagnostics_color_init. * diagnostic-color.h: Fix comment. From-SVN: r218406
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 911084d..04f63df 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -86,7 +86,6 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-expr.h"
#include "gimple.h"
#include "plugin.h"
-#include "diagnostic-color.h"
#include "context.h"
#include "pass_manager.h"
#include "auto-profile.h"
@@ -1268,29 +1267,6 @@ process_options (void)
maximum_field_alignment = initial_max_fld_align * BITS_PER_UNIT;
- /* If DIAGNOSTICS_COLOR_DEFAULT is -1, default to -fdiagnostics-color=auto
- if GCC_COLORS is in the environment, otherwise default to
- -fdiagnostics-color=never, for other values default to that
- -fdiagnostics-color={never,auto,always}. */
- if (!global_options_set.x_flag_diagnostics_show_color)
- switch ((int) DIAGNOSTICS_COLOR_DEFAULT)
- {
- case -1:
- if (!getenv ("GCC_COLORS"))
- break;
- /* FALLTHRU */
- case DIAGNOSTICS_COLOR_AUTO:
- pp_show_color (global_dc->printer)
- = colorize_init (DIAGNOSTICS_COLOR_AUTO);
- break;
- case DIAGNOSTICS_COLOR_YES:
- pp_show_color (global_dc->printer)
- = colorize_init (DIAGNOSTICS_COLOR_YES);
- break;
- default:
- break;
- }
-
/* Allow the front end to perform consistency checks and do further
initialization based on the command line options. This hook also
sets the original filename if appropriate (e.g. foo.i -> foo.c)