diff options
Diffstat (limited to 'gcc/ada/sem_eval.ads')
-rw-r--r-- | gcc/ada/sem_eval.ads | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/sem_eval.ads b/gcc/ada/sem_eval.ads index b79f61f..177a3e2 100644 --- a/gcc/ada/sem_eval.ads +++ b/gcc/ada/sem_eval.ads @@ -422,6 +422,15 @@ package Sem_Eval is -- for compile time evaluation purposes. Use Compile_Time_Known_Value -- instead (see section on "Compile-Time Known Values" above). + type Staticity is (Static, Not_Static, Invalid); + + function Is_OK_Static_Expression_Of_Type + (Expr : Node_Id; Typ : Entity_Id := Empty) return Staticity; + -- Return whether Expr is a static expression of the given type (i.e. it + -- will be analyzed and resolved using this type, which can be any valid + -- argument to Resolve, e.g. Any_Integer is OK). Includes checking that the + -- expression does not raise Constraint_Error. + function Is_OK_Static_Range (N : Node_Id) return Boolean; -- Determines if range is static, as defined in RM 4.9(26), and also checks -- that neither bound of the range raises constraint error, thus ensuring |