diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-29 12:56:31 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-29 12:56:31 +0000 |
commit | cda40848caccff3268bd45e8e5ef6211c1fb92ac (patch) | |
tree | 6cc8f3aef60cefb58f69e4a2c8d62232b4c13f10 /gcc/ada/sem_ch9.adb | |
parent | e74e5741d784a26f95f31a00597175f7526bb83c (diff) | |
download | gcc-cda40848caccff3268bd45e8e5ef6211c1fb92ac.tar.gz |
2014-07-29 Robert Dewar <dewar@adacore.com>
* sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
to Is_OK_Static_Range.
* sem_attr.adb (Eval_Attribute): Make sure we properly flag
static attributes (Eval_Attribute, case Size): Handle size of
zero properly (Eval_Attribute, case Value_Size): Handle size of
zero properly.
* sem_ch13.adb: Minor reformatting.
* sem_ch3.adb (Process_Range_Expr_In_Decl): Change
Is_Static_Range to Is_OK_Static_Range.
* sem_eval.adb (Eval_Case_Expression): Total rewrite, was
wrong in several ways (Is_Static_Range): Moved here from spec
(Is_Static_Subtype): Moved here from spec Change some incorrect
Is_Static_Subtype calls to Is_OK_Static_Subtype.
* sem_eval.ads: Add comments to section on
Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
Add clarifying comments (Is_Static_Range): Moved to body
(Is_Statically_Unevaluated): New function.
* sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
Is_Static_Range to Is_OK_Static_Range.
* sinfo.ads: Additional commments for Is_Static_Expression noting
that clients should almost always use Is_OK_Static_Expression
instead. Many other changes throughout front end units to obey
this rule.
* tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
for enumeration literal.
* exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
Replace all occurrences of Is_Static_Expression by
Is_OK_Static_Expression.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213159 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch9.adb')
-rw-r--r-- | gcc/ada/sem_ch9.adb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb index fb479561ed4..00f9abe5897 100644 --- a/gcc/ada/sem_ch9.adb +++ b/gcc/ada/sem_ch9.adb @@ -304,7 +304,8 @@ package body Sem_Ch9 is if Is_Scalar_Type (Etype (Attr)) and then Is_Scalar_Type (Etype (Prefix (Attr))) - and then Is_Static_Subtype (Etype (Prefix (Attr))) + and then + Is_OK_Static_Subtype (Etype (Prefix (Attr))) then Para := First (Expressions (Attr)); @@ -389,7 +390,7 @@ package body Sem_Ch9 is -- static function restricted. elsif Kind = N_Attribute_Reference - and then not Is_Static_Expression (N) + and then not Is_OK_Static_Expression (N) and then not Is_Static_Function (N) then if Lock_Free_Given then @@ -427,7 +428,7 @@ package body Sem_Ch9 is -- Non-static function calls restricted elsif Kind = N_Function_Call - and then not Is_Static_Expression (N) + and then not Is_OK_Static_Expression (N) then if Lock_Free_Given then Error_Msg_N @@ -1557,7 +1558,7 @@ package body Sem_Ch9 is goto Skip_LB; end if; - if Is_Static_Expression (LBR) + if Is_OK_Static_Expression (LBR) and then Expr_Value (LBR) < LB then Error_Msg_Uint_1 := LB; @@ -1583,7 +1584,7 @@ package body Sem_Ch9 is goto Skip_UB; end if; - if Is_Static_Expression (UBR) + if Is_OK_Static_Expression (UBR) and then Expr_Value (UBR) > UB then Error_Msg_Uint_1 := UB; |