+2011-04-22 Xinliang David Li <davidxl@google.com>
+
+ * toplev.c (process_options): Enable -Werror=coverage-mismatch
+ by default when -Wno-error is not specified.
+ * opts-global.c (decode_options): Remove call to
+ control_warning_options.
+
2011-04-22 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/48717
set_default_handlers (&handlers);
- /* Enable -Werror=coverage-mismatch by default. */
- control_warning_option (OPT_Wcoverage_mismatch, (int) DK_ERROR, true,
- loc, lang_mask,
- &handlers, opts, opts_set, dc);
-
default_options_optimization (opts, opts_set,
decoded_options, decoded_options_count,
loc, lang_mask, &handlers, dc);
flag_omit_frame_pointer = 0;
}
+ /* Enable -Werror=coverage-mismatch when -Werror and -Wno-error
+ have not been set. */
+ if (!global_options_set.x_warnings_are_errors
+ && warn_coverage_mismatch
+ && (global_dc->classify_diagnostic[OPT_Wcoverage_mismatch] ==
+ DK_UNSPECIFIED))
+ diagnostic_classify_diagnostic (global_dc, OPT_Wcoverage_mismatch,
+ DK_ERROR, UNKNOWN_LOCATION);
+
/* Save the current optimization options. */
optimization_default_node = build_optimization_node ();
optimization_current_node = optimization_default_node;