aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorNeil Vachharajani <nvachhar@google.com>2010-05-04 23:45:58 +0000
committerNeil Vachharajani <nvachhar@gcc.gnu.org>2010-05-04 23:45:58 +0000
commit650cfcab96c03bae93fe5eceafce792e86a661e3 (patch)
treeea706642f18ee85392a51bf61e49a74bfbdef8bb /gcc/opts.c
parent55a46075763ff282cd457c3dc5e00483dae32230 (diff)
downloadgcc-650cfcab96c03bae93fe5eceafce792e86a661e3.zip
gcc-650cfcab96c03bae93fe5eceafce792e86a661e3.tar.gz
gcc-650cfcab96c03bae93fe5eceafce792e86a661e3.tar.bz2
Sanitize the behavior of -Wcoverage-mismatch.
2010-05-04 Neil Vachharajani <nvachhar@google.com> * 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
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c3
1 files changed, 3 insertions, 0 deletions
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. */