summaryrefslogtreecommitdiff
path: root/gcc/ada/opt.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-22 15:07:34 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-22 15:07:34 +0000
commitc9e9428acdb5f84c9c0e7b47bb56d88033f0e706 (patch)
tree39eeab666d9c9d481fdac0dc571c6f231d614fab /gcc/ada/opt.ads
parent68e249dbfaec88c87d410233adf6332fddfb840b (diff)
downloadgcc-c9e9428acdb5f84c9c0e7b47bb56d88033f0e706.tar.gz
2008-08-22 Robert Dewar <dewar@adacore.com>
* checks.adb (Determine_Range): Deal with values that might be invalid * opt.adb, opt.ads (Assume_No_Invalid_Values[_Config]): New configuration switches. * par-prag.adb: Dummy entry for pragma Assume_No_Invalid_Values * sem_prag.adb: Implement pragma Assume_No_Default_Values * snames.adb, snames.ads, snames.h: Add entries for pragma Assume_No_Invalid_Values * switch-c.adb: Add processing for -gnatB switch * usage.adb: Add entry for flag -gnatB (no bad invalid values) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139484 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/opt.ads')
-rw-r--r--gcc/ada/opt.ads17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
index 1e68d70d2b8..542dc2568d0 100644
--- a/gcc/ada/opt.ads
+++ b/gcc/ada/opt.ads
@@ -158,6 +158,15 @@ package Opt is
-- GNAT
-- Enable assertions made using pragma Assert
+ Assume_No_Invalid_Values : Boolean := True;
+ -- ??? true for now, enable by setting to false later
+ -- GNAT
+ -- Normallly, in accordance with (RM 13.9.1 (9-11)) the front end assumes
+ -- that values could have invalid representations, unless it can clearly
+ -- prove that the values are valid. If this switch is set (by -gnatB or by
+ -- pragma Assume_No_Invalid_Values (Off)), then the compiler assumes values
+ -- are valid and in range of their representations.
+
Back_Annotate_Rep_Info : Boolean := False;
-- GNAT
-- If set True, enables back annotation of representation information
@@ -1414,6 +1423,13 @@ package Opt is
-- mode, as possibly set by the command line switch -gnata, and possibly
-- modified by the use of the configuration pragma Assertion_Policy.
+ Assume_No_Invalid_Values_Config : Boolean;
+ -- GNAT
+ -- This is the value of the configuration switch for assuming no invalid
+ -- values enabled mode mode, as possibly set by the command line switch
+ -- -gnatB, and possibly modified by the use of the configuration pragma
+ -- Assume_No_Invalid_Values.
+
Check_Policy_List_Config : Node_Id;
-- GNAT
-- This points to the list of N_Pragma nodes for Check_Policy pragmas
@@ -1612,6 +1628,7 @@ private
Ada_Version : Ada_Version_Type;
Ada_Version_Explicit : Ada_Version_Type;
Assertions_Enabled : Boolean;
+ Assume_No_Invalid_Values : Boolean;
Check_Policy_List : Node_Id;
Debug_Pragmas_Enabled : Boolean;
Dynamic_Elaboration_Checks : Boolean;