Commit e3d6bccc by Hristian Kirtchev Committed by Arnaud Charlet

sem_ch3.adb, [...]: Minor reformatting.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch3.adb, sem_util.adb: Minor reformatting.

From-SVN: r229354
parent 97561cdc
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb, sem_util.adb: Minor reformatting.
2015-10-26 Javier Miranda <miranda@adacore.com>
* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Return False when
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment