static void set_std_cxx11 (int);
static void set_std_c89 (int, int);
static void set_std_c99 (int);
-static void set_std_c1x (int);
+static void set_std_c11 (int);
static void check_deps_environment_vars (void);
static void handle_deferred_opts (void);
static void sanitize_cpp_opts (void);
warn_reorder = value;
warn_cxx0x_compat = value;
warn_delnonvdtor = value;
+ warn_narrowing = value;
}
cpp_opts->warn_trigraphs = value;
cpp_opts->warn_cxx_operator_names = value;
break;
+ case OPT_Wc__0x_compat:
+ warn_narrowing = value;
+ break;
+
case OPT_Wdeprecated:
cpp_opts->cpp_warn_deprecated = value;
break;
cpp_opts->warn_endif_labels = value;
break;
- case OPT_Werror:
- global_dc->warning_as_error_requested = value;
- break;
-
case OPT_Wformat:
set_Wformat (value);
break;
cpp_opts->extended_identifiers = value;
break;
- case OPT_fgnu_runtime:
- flag_next_runtime = !value;
- break;
-
- case OPT_fnext_runtime:
- flag_next_runtime = value;
- break;
-
case OPT_foperator_names:
cpp_opts->operator_names = value;
break;
set_std_c99 (false /* ISO */);
break;
- case OPT_std_c1x:
+ case OPT_std_c11:
if (!preprocessing_asm_p)
- set_std_c1x (true /* ISO */);
+ set_std_c11 (true /* ISO */);
break;
- case OPT_std_gnu1x:
+ case OPT_std_gnu11:
if (!preprocessing_asm_p)
- set_std_c1x (false /* ISO */);
+ set_std_c11 (false /* ISO */);
break;
case OPT_trigraphs:
if (warn_implicit_function_declaration == -1)
warn_implicit_function_declaration = flag_isoc99;
- /* If we're allowing C++0x constructs, don't warn about C++0x
- compatibility problems. */
if (cxx_dialect == cxx0x)
- warn_cxx0x_compat = 0;
+ {
+ /* If we're allowing C++0x constructs, don't warn about C++98
+ identifiers which are keywords in C++0x. */
+ warn_cxx0x_compat = 0;
+
+ if (warn_narrowing == -1)
+ warn_narrowing = 1;
+ }
+ else if (warn_narrowing == -1)
+ warn_narrowing = 0;
if (flag_preprocess_only)
{
&& flag_preprocess_only && !flag_no_line_commands)
pp_dir_change (parse_in, get_src_pwd ());
+ /* Disable LTO output when outputting a precompiled header. */
+ if (pch_file && flag_lto)
+ {
+ flag_lto = 0;
+ flag_generate_lto = 0;
+ }
+
return flag_preprocess_only;
}
flag_no_nonansi_builtin = iso;
flag_isoc94 = c94;
flag_isoc99 = 0;
- flag_isoc1x = 0;
+ flag_isoc11 = 0;
}
/* Set the C 99 standard (without GNU extensions if ISO). */
flag_no_asm = iso;
flag_no_nonansi_builtin = iso;
flag_iso = iso;
- flag_isoc1x = 0;
+ flag_isoc11 = 0;
flag_isoc99 = 1;
flag_isoc94 = 1;
}
-/* Set the C 1X standard draft (without GNU extensions if ISO). */
+/* Set the C 11 standard (without GNU extensions if ISO). */
static void
-set_std_c1x (int iso)
+set_std_c11 (int iso)
{
- cpp_set_lang (parse_in, iso ? CLK_STDC1X: CLK_GNUC1X);
+ cpp_set_lang (parse_in, iso ? CLK_STDC11: CLK_GNUC11);
flag_no_asm = iso;
flag_no_nonansi_builtin = iso;
flag_iso = iso;
- flag_isoc1x = 1;
+ flag_isoc11 = 1;
flag_isoc99 = 1;
flag_isoc94 = 1;
}