diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-01 13:21:34 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-01 13:21:34 +0000 |
commit | e6281d47053107016083c88e259e1451d8a2ea13 (patch) | |
tree | 3e50d4f87942db537688cbf1da9753c4af48b621 /gcc/ada/sem_eval.ads | |
parent | 2fe22c694693e247590b8cfacea752a6fb07736b (diff) | |
download | gcc-e6281d47053107016083c88e259e1451d8a2ea13.tar.gz |
2012-10-01 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Apply_Predicate_Check): If the predicate is a
static one and the operand is static, evaluate the predicate at
compile time.
* sem_eval.ads, sem_eval.adb (Eval_Static_Predicate_Check): new
procedure, to evaluate a static predicate check whenever possible.
* sem_res.adb (Resolve_Type_Conversion): Apply predicate check
on the conversion if the target type has predicates.
2012-10-01 Vincent Pucci <pucci@adacore.com>
* sem_dim.adb (Has_Symbols): Complain if parameter Symbol has been
provided by the user in the dimension output call.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191921 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_eval.ads')
-rw-r--r-- | gcc/ada/sem_eval.ads | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/sem_eval.ads b/gcc/ada/sem_eval.ads index a2f69feac33..787e6d346c8 100644 --- a/gcc/ada/sem_eval.ads +++ b/gcc/ada/sem_eval.ads @@ -317,6 +317,11 @@ package Sem_Eval is procedure Eval_Unary_Op (N : Node_Id); procedure Eval_Unchecked_Conversion (N : Node_Id); + function Eval_Static_Predicate_Check + (N : Node_Id; + Typ : Entity_Id) return Boolean; + -- Evaluate a static predicate check applied to a scalar literal. + procedure Fold_Str (N : Node_Id; Val : String_Id; Static : Boolean); -- Rewrite N with a new N_String_Literal node as the result of the compile -- time evaluation of the node N. Val is the resulting string value from |