summaryrefslogtreecommitdiff
path: root/compiler/options.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-05-12 14:29:11 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-05-12 14:29:11 +0000
commitcbace3709eb9da6b692d2d7156cc544b91ea517e (patch)
treea10cb9d21c5ba4aec104d0fff485cc6b19c30bc9 /compiler/options.pas
parent57e0911ae50816f80af023d3c95d32cb6a3da109 (diff)
downloadfpc-cbace3709eb9da6b692d2d7156cc544b91ea517e.tar.gz
+ support for verifying whether a case statements handles all possibilities
(based on patch by Martok) o enabled by default in ISO and Extended Pascal: compile-time error if not the case in ISO mode, warning and run-time error in Extended Pascal mode o warning enabled by default in all other modes for boolean, enumeration and subrange integer types with ranges different from the default ones (i.e., different from 0..255, -128..127, 0..65536, etc) o warnings for all ordinal types can be enabled in all modes with -CC git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@42047 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/options.pas')
-rw-r--r--compiler/options.pas5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/options.pas b/compiler/options.pas
index d8419677b8..5cefa9cfc0 100644
--- a/compiler/options.pas
+++ b/compiler/options.pas
@@ -2036,6 +2036,11 @@ begin
exclude(init_settings.moduleswitches,cs_support_c_operators)
else
include(init_settings.moduleswitches,cs_support_c_operators);
+ 'C':
+ If UnsetBool(More, j, opt, false) then
+ exclude(init_settings.localswitches,cs_check_all_case_coverage)
+ else
+ include(init_settings.localswitches,cs_check_all_case_coverage);
'd' : //an alternative to -Mdelphi
SetCompileMode('DELPHI',true);
'e' :