diff options
author | Xinliang David Li <davidxl@google.com> | 2011-04-22 19:11:49 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@gcc.gnu.org> | 2011-04-22 19:11:49 +0000 |
commit | ae01169c6918a8ba506c908372bcd4e01fd34714 (patch) | |
tree | 2350312e2c663ac6de07288fc6b7ee097866a82b /gcc/toplev.c | |
parent | 93dfac24adf650e093d21f71193072626595a37d (diff) | |
download | gcc-ae01169c6918a8ba506c908372bcd4e01fd34714.zip gcc-ae01169c6918a8ba506c908372bcd4e01fd34714.tar.gz gcc-ae01169c6918a8ba506c908372bcd4e01fd34714.tar.bz2 |
Proper handling of -Werror=coverage-mismatch
From-SVN: r172870
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index c0f6ee3..06014a9 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1600,6 +1600,15 @@ process_options (void) 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; |