Commit 558fbeb0 by Hristian Kirtchev Committed by Arnaud Charlet

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

2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>

	* checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
	Minor reformatting.

From-SVN: r235714
parent 1e60643a
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com> 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
Minor reformatting.
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch4.adb (Find_Indexing_Operations): Use the underlying type * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
of the container base type in case the container is a subtype. of the container base type in case the container is a subtype.
* sem_ch5.adb (Analyze_Iterator_Specification): Ensure that * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
......
...@@ -2717,8 +2717,8 @@ package body Checks is ...@@ -2717,8 +2717,8 @@ package body Checks is
else else
Insert_Action (N, Insert_Action (N,
Make_Predicate_Check (Typ, Duplicate_Subexpr (N)), Make_Predicate_Check
Suppress => All_Checks); (Typ, Duplicate_Subexpr (N)), Suppress => All_Checks);
end if; end if;
end if; end if;
end if; end if;
......
...@@ -1281,15 +1281,16 @@ package body Freeze is ...@@ -1281,15 +1281,16 @@ package body Freeze is
if Is_Packed_Array (Comp_Type) then if Is_Packed_Array (Comp_Type) then
Error_Msg_N Error_Msg_N
("type of packed component must have same scalar " ("type of packed component must have same scalar storage "
& "storage order as enclosing composite", Err_Node); & "order as enclosing composite", Err_Node);
-- Reject if composite is a packed array, as it may be rewritten -- Reject if composite is a packed array, as it may be rewritten
-- into an array of scalars. -- into an array of scalars.
elsif Is_Packed_Array (Encl_Type) then elsif Is_Packed_Array (Encl_Type) then
Error_Msg_N ("type of packed array must have same scalar " Error_Msg_N
& "storage order as component", Err_Node); ("type of packed array must have same scalar storage order "
& "as component", Err_Node);
-- Reject if not byte aligned -- Reject if not byte aligned
...@@ -1304,8 +1305,8 @@ package body Freeze is ...@@ -1304,8 +1305,8 @@ package body Freeze is
elsif Present (ADC) and then No (Comp_ADC) then elsif Present (ADC) and then No (Comp_ADC) then
Error_Msg_NE Error_Msg_NE
("scalar storage order specified for& doesn''t " ("scalar storage order specified for & does not apply to "
& "apply to component?", Err_Node, Encl_Type); & "component?", Err_Node, Encl_Type);
end if; end if;
end if; end if;
...@@ -1314,8 +1315,8 @@ package body Freeze is ...@@ -1314,8 +1315,8 @@ package body Freeze is
elsif Present (ADC) and then Component_Aliased then elsif Present (ADC) and then Component_Aliased then
Error_Msg_N Error_Msg_N
("aliased component not permitted for type with " ("aliased component not permitted for type with explicit "
& "explicit Scalar_Storage_Order", Err_Node); & "Scalar_Storage_Order", Err_Node);
end if; end if;
end Check_Component_Storage_Order; end Check_Component_Storage_Order;
......
...@@ -255,7 +255,8 @@ package body System.Storage_Pools.Subpools is ...@@ -255,7 +255,8 @@ package body System.Storage_Pools.Subpools is
-- Step 4: Attachment -- Step 4: Attachment
if Is_Controlled then if Is_Controlled then
-- Note that we already did "Lock_Task.all;" in Step 2 above.
-- Note that we already did "Lock_Task.all;" in Step 2 above
-- Map the allocated memory into a FM_Node record. This converts the -- Map the allocated memory into a FM_Node record. This converts the
-- top of the allocated bits into a list header. If there is padding -- top of the allocated bits into a list header. If there is padding
...@@ -273,8 +274,8 @@ package body System.Storage_Pools.Subpools is ...@@ -273,8 +274,8 @@ package body System.Storage_Pools.Subpools is
-- | | -- | |
-- +- Header_And_Padding --+ -- +- Header_And_Padding --+
N_Ptr := Address_To_FM_Node_Ptr N_Ptr :=
(N_Addr + Header_And_Padding - Header_Size); Address_To_FM_Node_Ptr (N_Addr + Header_And_Padding - Header_Size);
-- Prepend the allocated object to the finalization master -- Prepend the allocated object to the finalization master
...@@ -330,7 +331,9 @@ package body System.Storage_Pools.Subpools is ...@@ -330,7 +331,9 @@ package body System.Storage_Pools.Subpools is
exception exception
when others => when others =>
-- If we locked, we want to unlock
-- Unlock the task in case the allocation step failed and reraise the
-- exception.
if Is_Controlled then if Is_Controlled then
Unlock_Task.all; Unlock_Task.all;
...@@ -443,7 +446,9 @@ package body System.Storage_Pools.Subpools is ...@@ -443,7 +446,9 @@ package body System.Storage_Pools.Subpools is
exception exception
when others => when others =>
-- If we locked, we want to unlock
-- Unlock the task in case the computations performed above
-- fail for some reason.
Unlock_Task.all; Unlock_Task.all;
raise; raise;
......
...@@ -9446,9 +9446,9 @@ package body Sem_Res is ...@@ -9446,9 +9446,9 @@ package body Sem_Res is
Apply_Scalar_Range_Check (Expr, Typ); Apply_Scalar_Range_Check (Expr, Typ);
end if; end if;
-- Finally, check whether a predicate applies to the target type. -- Finally, check whether a predicate applies to the target type. This
-- This comes from AI12-0100. As for type conversions, check the -- comes from AI12-0100. As for type conversions, check the enclosing
-- enclosing context to prevent an infinite expansion. -- context to prevent an infinite expansion.
if Has_Predicates (Target_Typ) then if Has_Predicates (Target_Typ) then
if Nkind (Parent (N)) = N_Function_Call if Nkind (Parent (N)) = N_Function_Call
......
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