diff options
author | davidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-22 19:11:49 +0000 |
---|---|---|
committer | davidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-22 19:11:49 +0000 |
commit | 68ebb06f1234d117142dd0badf2b08cfdad83630 (patch) | |
tree | 2350312e2c663ac6de07288fc6b7ee097866a82b /gcc/toplev.c | |
parent | 19d861b9ef541120d660730921101a4048b302f5 (diff) | |
download | gcc-68ebb06f1234d117142dd0badf2b08cfdad83630.tar.gz |
Proper handling of -Werror=coverage-mismatch
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172870 138bc75d-0d04-0410-961f-82ee72b054a4
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 c0f6ee3681e..06014a938e5 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; |