From 650cfcab96c03bae93fe5eceafce792e86a661e3 Mon Sep 17 00:00:00 2001 From: Neil Vachharajani Date: Tue, 4 May 2010 23:45:58 +0000 Subject: Sanitize the behavior of -Wcoverage-mismatch. 2010-05-04 Neil Vachharajani * doc/invoke.texi (-Wcoverage-mismatch): Updated documentation as per new semantics. * opts.c (decode_options): Enable -Werror=coverage-mismatch. * coverage.c (get_coverage_counts): Always emit a warning. Adjust conditions for printing notes. * common.opt (-Wcoverage-mismatch): Allow negative, default to true, update documentation. * Makefile.in (coverage.o): Add dependence on DIAGNOSTIC_H and intl.h. * testsuite/gcc.dg/tree-prof/wcoverage-mismatch.c: Adjusted. From-SVN: r159050 --- gcc/opts.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/opts.c') diff --git a/gcc/opts.c b/gcc/opts.c index 507b502..fd8a504 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -946,6 +946,9 @@ decode_options (unsigned int argc, const char **argv) else set_param_value ("min-crossjump-insns", initial_min_crossjump_insns); + /* Enable -Werror=coverage-mismatch by default */ + enable_warning_as_error("coverage-mismatch", 1, lang_mask); + if (first_time_p) { /* Initialize whether `char' is signed. */ -- cgit v1.1