aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/validsw.ads
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-07-04 08:07:19 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-04 08:07:19 +0000
commit7cbe60de258f6d09561d4fe32dac8892b52520fe (patch)
tree551af59dfb80446b3ec68ca91ffe686ad68d8838 /gcc/ada/validsw.ads
parenteedc5882dd635ce9cfaa650c790081b5130749af (diff)
downloadgcc-7cbe60de258f6d09561d4fe32dac8892b52520fe.zip
gcc-7cbe60de258f6d09561d4fe32dac8892b52520fe.tar.gz
gcc-7cbe60de258f6d09561d4fe32dac8892b52520fe.tar.bz2
[Ada] Clean up support for validity checks in the compiler
This removes old code in the parser that serves no useful purpose and fixes minor issues in the Validsw package. No functional changes. 2019-07-04 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to set the validity settings in CodePeer mode. * par-load.adb (Load): Remove all code dealing with validity settings. * validsw.ads (Validity_Check_Copies): Alphabetize. * validsw.adb (Reset_Validity_Check_Options): Set all options to off. (Save_Validity_Check_Options): Save all options. From-SVN: r273071
Diffstat (limited to 'gcc/ada/validsw.ads')
-rw-r--r--gcc/ada/validsw.ads48
1 files changed, 24 insertions, 24 deletions
diff --git a/gcc/ada/validsw.ads b/gcc/ada/validsw.ads
index 2dadc5c..5197bdf 100644
--- a/gcc/ada/validsw.ads
+++ b/gcc/ada/validsw.ads
@@ -40,33 +40,33 @@ package Validsw is
-- or in the argument of a Validity_Checks pragma to activate the option.
-- The corresponding upper case letter deactivates the option.
+ Validity_Check_Components : Boolean := False;
+ -- Controls validity checking for assignment to elementary components of
+ -- records. If this switch is set to True using -gnatVe, or an 'e' in the
+ -- argument of Validity_Checks pragma, then the right-hand side of an
+ -- assignment to such a component is checked for validity.
+
Validity_Check_Copies : Boolean := False;
-- Controls the validity checking of copies. If this switch is set to
- -- true using -gnatVc, or a 'c' in the argument of a Validity_Checks
- -- pragma, then the right side of assignments and also initializing
+ -- True using -gnatVc, or a 'c' in the argument of a Validity_Checks
+ -- pragma, then the right-hand side of assignments and also initializing
-- expressions in object declarations are checked for validity.
- Validity_Check_Components : Boolean := False;
- -- Controls validity checking for assignment to elementary components of
- -- records. If this switch is set true using -gnatVe, or an 'e' in the
- -- argument of Validity_Checks pragma, then the right hand of an assignment
- -- to such a component is checked for validity.
-
Validity_Check_Default : Boolean := True;
-- Controls default (reference manual) validity checking. If this switch is
-- set to True using -gnatVd or a 'd' in the argument of a Validity_Checks
- -- pragma (or the initial default value is used, set True), then left side
- -- subscripts and case statement arguments are checked for validity. This
- -- switch is also set by default if no -gnatV switch is used and no
+ -- pragma (or the initial default value is used, set True), then left-hand
+ -- side subscripts and case statement arguments are checked for validity.
+ -- This switch is also set by default if no -gnatV switch is used and no
-- Validity_Checks pragma is processed.
Validity_Check_Floating_Point : Boolean := False;
- -- Normally validity checking applies only to discrete values (integer
- -- and enumeration types). If this switch is set to True using -gnatVf
- -- or an 'f' in the argument of a Validity_Checks pragma, then floating-
- -- point values are also checked. The context in which such checks
- -- occur depends on other flags, e.g. if Validity_Check_Copies is also
- -- set then floating-point values on the right side of an assignment
+ -- Normally validity checking applies only to discrete values (integer and
+ -- enumeration types). If this switch is set to True using -gnatVf or an
+ -- 'f' in the argument of a Validity_Checks pragma, then floating-point
+ -- values are also checked. If the context in which such checks occur
+ -- depends on other flags, e.g. if Validity_Check_Copies is also set,
+ -- then floating-point values on the right-hand side of an assignment
-- will be validity checked.
Validity_Check_In_Out_Params : Boolean := False;
@@ -103,13 +103,13 @@ package Validsw is
-- pragma, then the expression in a RETURN statement is validity checked.
Validity_Check_Subscripts : Boolean := False;
- -- Controls validity checking of subscripts. If this switch is set to
- -- True using -gnatVs, or an 's' in the argument of a Validity_Checks
- -- pragma, then all subscripts are checked for validity. Note that left
- -- side subscript checking is controlled also by Validity_Check_Default.
- -- If Validity_Check_Subscripts is True, then all subscripts are checked,
- -- otherwise if Validity_Check_Default is True, then left side subscripts
- -- are checked, otherwise no subscripts are checked.
+ -- Controls validity checking of subscripts. If this switch is set to True
+ -- using -gnatVs, or an 's' in the argument of a Validity_Checks pragma,
+ -- then all subscripts are checked for validity. Note that left-hand side
+ -- subscript checking is also controlled by Validity_Check_Default. If
+ -- Validity_Check_Subscripts is True, then all subscripts are checked,
+ -- otherwise if Validity_Check_Default is True, then left-hand side
+ -- subscripts are checked; otherwise no subscripts are checked.
Validity_Check_Tests : Boolean := False;
-- Controls validity checking of tests that occur in conditions (i.e. the