flag_exceptions = c_dialect_cxx ();
warn_pointer_arith = c_dialect_cxx ();
warn_write_strings = c_dialect_cxx();
+ flag_warn_unused_result = true;
/* By default, C99-like requirements for complex multiply and divide. */
flag_complex_method = 2;
/* Prevent resetting the language standard to a C dialect when the driver
has already determined that we're looking at assembler input. */
bool preprocessing_asm_p = (cpp_get_options (parse_in)->lang == CLK_ASM);
-
+
switch (code)
{
default:
case OPT_MD:
case OPT_MMD:
cpp_opts->deps.style = (code == OPT_MD ? DEPS_SYSTEM: DEPS_USER);
+ cpp_opts->deps.need_preprocessor_output = true;
deps_file = arg;
break;
implies -Wenum-compare. */
if (warn_enum_compare == -1 && value)
warn_enum_compare = value;
+ /* Because C++ always warns about a goto which misses an
+ initialization, -Wc++-compat turns on -Wjump-misses-init. */
+ if (warn_jump_misses_init == -1 && value)
+ warn_jump_misses_init = value;
+ cpp_opts->warn_cxx_operator_names = value;
break;
case OPT_Wdeprecated:
global_dc->warning_as_error_requested = value;
break;
- case OPT_Werror_implicit_function_declaration:
+ case OPT_Werror_implicit_function_declaration:
/* For backward compatibility, this is the same as
-Werror=implicit-function-declaration. */
- enable_warning_as_error ("implicit-function-declaration", value, CL_C | CL_ObjC);
+ enable_warning_as_error ("implicit-function-declaration", value, CL_C | CL_ObjC);
break;
case OPT_Wformat:
break;
case OPT_ftemplate_depth_:
+ /* Kept for backwards compatibility. */
+ case OPT_ftemplate_depth_eq:
max_tinst_depth = value;
break;
break;
case OPT_std_c89:
+ case OPT_std_c90:
case OPT_std_iso9899_1990:
case OPT_std_iso9899_199409:
if (!preprocessing_asm_p)
break;
case OPT_std_gnu89:
+ case OPT_std_gnu90:
if (!preprocessing_asm_p)
set_std_c89 (false /* c94 */, false /* ISO */);
break;
warn_strict_aliasing = 0;
if (warn_strict_overflow == -1)
warn_strict_overflow = 0;
+ if (warn_jump_misses_init == -1)
+ warn_jump_misses_init = 0;
/* -Woverlength-strings is off by default, but is enabled by -pedantic.
It is never enabled in C++, as the minimum limit is not normative
}
/* -Wimplicit-function-declaration is enabled by default for C99. */
- if (warn_implicit_function_declaration == -1)
+ 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
/* Wlong-long is disabled by default. It is enabled by:
[-pedantic | -Wtraditional] -std=[gnu|c]++98 ; or
- [-pedantic | -Wtraditional] -std=non-c99 .
+ [-pedantic | -Wtraditional] -std=non-c99 .
Either -Wlong-long or -Wno-long-long override any other settings. */
if (warn_long_long == -1)