From e3d6bccc831ddd49e6b8e888df5e301c2da339b4 Mon Sep 17 00:00:00 2001 From: Hristian Kirtchev Date: Mon, 26 Oct 2015 13:04:09 +0000 Subject: [PATCH] sem_ch3.adb, [...]: Minor reformatting. 2015-10-26 Hristian Kirtchev * sem_ch3.adb, sem_util.adb: Minor reformatting. From-SVN: r229354 --- gcc/ada/ChangeLog | 4 ++++ gcc/ada/sem_ch3.adb | 13 ++++++------- gcc/ada/sem_util.adb | 36 ++++++++++++++++++++++-------------- 3 files changed, 32 insertions(+), 21 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 2066c1f8656..4ce0053b4c7 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2015-10-26 Hristian Kirtchev + + * sem_ch3.adb, sem_util.adb: Minor reformatting. + 2015-10-26 Javier Miranda * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Return False when diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 9b5f5dac3d9..7358c0d7a18 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -3276,7 +3276,7 @@ package body Sem_Ch3 is function Count_Tasks (T : Entity_Id) return Uint; -- This function is called when a non-generic library level object of a -- task type is declared. Its function is to count the static number of - -- tasks declared within the type (it is only called if Has_Tasks is set + -- tasks declared within the type (it is only called if Has_Task is set -- for T). As a side effect, if an array of tasks with non-static bounds -- or a variant record type is encountered, Check_Restriction is called -- indicating the count is unknown. @@ -5241,14 +5241,13 @@ package body Sem_Ch3 is Cstr : constant Node_Id := Constraint (Subtype_Indication (N)); begin if Nkind (Cstr) = N_Index_Or_Discriminant_Constraint - and then not (Is_Internal (Defining_Identifier (N)) - and then Is_TSS (Scope (Defining_Identifier (N)), - TSS_Composite_Equality)) + and then not (Is_Internal (Id) + and then Is_TSS (Scope (Id), + TSS_Composite_Equality)) and then not Within_Init_Proc + and then not All_Composite_Constraints_Static (Cstr) then - if not All_Composite_Constraints_Static (Cstr) then - Check_Restriction (No_Dynamic_Sized_Objects, Cstr); - end if; + Check_Restriction (No_Dynamic_Sized_Objects, Cstr); end if; end; end if; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index f27b855437e..1ac0a2f1911 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -452,33 +452,39 @@ package body Sem_Util is and then Present (Entity (Constr)) then if Is_Type (Entity (Constr)) then - return not Is_Discrete_Type (Entity (Constr)) - or else Is_OK_Static_Subtype (Entity (Constr)); + return + not Is_Discrete_Type (Entity (Constr)) + or else Is_OK_Static_Subtype (Entity (Constr)); end if; elsif Nkind (Constr) = N_Range then - return Is_OK_Static_Expression (Low_Bound (Constr)) - and then Is_OK_Static_Expression (High_Bound (Constr)); + return + Is_OK_Static_Expression (Low_Bound (Constr)) + and then + Is_OK_Static_Expression (High_Bound (Constr)); elsif Nkind (Constr) = N_Attribute_Reference and then Attribute_Name (Constr) = Name_Range then - return Is_OK_Static_Expression - (Type_Low_Bound (Etype (Prefix (Constr)))) - and then Is_OK_Static_Expression + return + Is_OK_Static_Expression + (Type_Low_Bound (Etype (Prefix (Constr)))) + and then + Is_OK_Static_Expression (Type_High_Bound (Etype (Prefix (Constr)))); end if; - return not Present (Etype (Constr)) -- previous error - or else not Is_Discrete_Type (Etype (Constr)) - or else Is_OK_Static_Expression (Constr); + return + not Present (Etype (Constr)) -- previous error + or else not Is_Discrete_Type (Etype (Constr)) + or else Is_OK_Static_Expression (Constr); when N_Discriminant_Association => return All_Composite_Constraints_Static (Expression (Constr)); when N_Range_Constraint => - return All_Composite_Constraints_Static - (Range_Expression (Constr)); + return + All_Composite_Constraints_Static (Range_Expression (Constr)); when N_Index_Or_Discriminant_Constraint => declare @@ -497,8 +503,10 @@ package body Sem_Util is return True; when N_Subtype_Indication => - return All_Composite_Constraints_Static (Subtype_Mark (Constr)) - and then All_Composite_Constraints_Static (Constraint (Constr)); + return + All_Composite_Constraints_Static (Subtype_Mark (Constr)) + and then + All_Composite_Constraints_Static (Constraint (Constr)); when others => raise Program_Error; -- 2.30.2