diff options
author | gingell <gingell@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-28 15:33:09 +0000 |
---|---|---|
committer | gingell <gingell@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-28 15:33:09 +0000 |
commit | 226494a382d663c05017fcc4922273e874c384eb (patch) | |
tree | de291fbe38321eee24920156c79d6252aa6b59ba /gcc/ada/checks.ads | |
parent | fcb1a9563eb5c90ff41c1397f161a6c59b5e039a (diff) | |
download | gcc-226494a382d663c05017fcc4922273e874c384eb.tar.gz |
* checks.ads:
(Remove_Checks): New procedure
* checks.adb:
(Remove_Checks): New procedure
* exp_util.adb:
Use new Duplicate_Subexpr functions
(Duplicate_Subexpr_No_Checks): New procedure
(Duplicate_Subexpr_No_Checks_Orig): New procedure
(Duplicate_Subexpr): Restore original form (checks duplicated)
(Duplicate_Subexpr): Call Remove_Checks
* exp_util.ads:
(Duplicate_Subexpr_No_Checks): New procedure
(Duplicate_Subexpr_No_Checks_Orig): New procedure
Add 2002 to copyright notice
* sem_util.adb: Use new Duplicate_Subexpr functions
* sem_eval.adb:
(Eval_Indexed_Component): This is the place to call
Constant_Array_Ref and to replace the value. We simply merge
the code of this function in here, since it is now no longer
used elsewhere. This fixes the problem of the back end not
realizing we were clever enough to see that this was
constant.
(Expr_Val): Remove call to Constant_Array_Ref
(Expr_Rep_Val): Remove call to Constant_Array_Ref
Minor reformatting
(Constant_Array_Ref): Deal with string literals (patch
suggested by Zack Weinberg on the gcc list)
* exp_util.adb: Duplicate_Subexpr_No_Checks_Orig =>
Duplicate_Subexpr_Move_Checks.
* exp_util.ads: Duplicate_Subexpr_No_Checks_Orig =>
Duplicate_Subexpr_Move_Checks.
* sem_eval.adb: (Constant_Array_Ref): Verify that constant
value of array exists before retrieving it (it may a private
protected component in a function).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51513 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/checks.ads')
-rw-r--r-- | gcc/ada/checks.ads | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/checks.ads b/gcc/ada/checks.ads index df2c4624359..e35e889e0bf 100644 --- a/gcc/ada/checks.ads +++ b/gcc/ada/checks.ads @@ -496,6 +496,11 @@ package Checks is -- the sense of the 'Valid attribute returning True. Constraint_Error -- will be raised if the value is not valid. + procedure Remove_Checks (Expr : Node_Id); + -- Remove all checks from Expr except those that are only executed + -- conditionally (on the right side of And Then/Or Else. This call + -- removes only embedded checks (Do_Range_Check, Do_Overflow_Check). + private type Check_Result is array (Positive range 1 .. 2) of Node_Id; |