re PR debug/66691 (ICE on valid code at -O3 with -g enabled in simplify_subreg, at...
[gcc.git] / gcc / opts-global.c
index 149abc41a16929ac80aeb8f25e7a545361c0cb75..2fc62503f03728a4aeac1261ef2bad4dd9ed2086 100644 (file)
@@ -1,6 +1,6 @@
 /* Command line option handling.  Code involving global state that
    should not be shared with the driver.
-   Copyright (C) 2002-2014 Free Software Foundation, Inc.
+   Copyright (C) 2002-2015 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -24,26 +24,24 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic.h"
 #include "opts.h"
 #include "flags.h"
+#include "alias.h"
+#include "symtab.h"
 #include "tree.h" /* Required by langhooks.h.  */
+#include "fold-const.h"
 #include "predict.h"
-#include "vec.h"
-#include "hashtab.h"
-#include "hash-set.h"
-#include "machmode.h"
 #include "tm.h"
 #include "hard-reg-set.h"
-#include "input.h"
 #include "function.h"
 #include "basic-block.h"
 #include "tree-ssa-alias.h"
 #include "internal-fn.h"
 #include "gimple-expr.h"
-#include "is-a.h"
 #include "gimple.h"
 #include "langhooks.h"
 #include "rtl.h"
 #include "dbgcnt.h"
 #include "debug.h"
+#include "cgraph.h"
 #include "lto-streamer.h"
 #include "output.h"
 #include "plugin.h"
@@ -128,7 +126,7 @@ complain_wrong_lang (const struct cl_decoded_option *decoded,
    we only complain about unknown -Wno-* options if they may have
    prevented a diagnostic. Otherwise, we just ignore them.  Note that
    if we do complain, it is only as a warning, not an error; passing
-   the compiler an unrecognised -Wno-* option should never change
+   the compiler an unrecognized -Wno-* option should never change
    whether the compilation succeeds or fails.  */
 
 static void
@@ -148,7 +146,7 @@ print_ignored_options (void)
 
       opt = ignored_options.pop ();
       warning_at (UNKNOWN_LOCATION, 0,
-                 "unrecognized command line option \"%s\"", opt);
+                 "unrecognized command line option %qs", opt);
     }
 }
 
@@ -257,6 +255,11 @@ init_options_once (void)
   initial_lang_mask = lang_hooks.option_lang_mask ();
 
   lang_hooks.initialize_diagnostics (global_dc);
+  /* ??? Ideally, we should do this earlier and the FEs will override
+     it if desired (none do it so far).  However, the way the FEs
+     construct their pretty-printers means that all previous settings
+     are overriden.  */
+  diagnostic_color_init (global_dc);
 }
 
 /* Decode command-line options to an array, like
@@ -443,6 +446,10 @@ handle_common_deferred_options (void)
             error ("unrecognized shadow offset %qs", opt->arg);
          break;
 
+       case OPT_fsanitize_sections_:
+         set_sanitized_sections (opt->arg);
+         break;
+
        default:
          gcc_unreachable ();
        }