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>
* 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
of the container base type in case the container is a subtype.
* sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
......
......@@ -2710,15 +2710,15 @@ package body Checks is
Make_Predicate_Check
(Typ, New_Occurrence_Of (Entity (N), Sloc (N))));
-- If the expression is not an entity it may have side-effects,
-- and the following call will create an object declaration for
-- it. We disable checks during its analysis, to prevent an
-- infinite recursion.
-- If the expression is not an entity it may have side-effects,
-- and the following call will create an object declaration for
-- it. We disable checks during its analysis, to prevent an
-- infinite recursion.
else
Insert_Action (N,
Make_Predicate_Check (Typ, Duplicate_Subexpr (N)),
Suppress => All_Checks);
Make_Predicate_Check
(Typ, Duplicate_Subexpr (N)), Suppress => All_Checks);
end if;
end if;
end if;
......
......@@ -1281,20 +1281,21 @@ package body Freeze is
if Is_Packed_Array (Comp_Type) then
Error_Msg_N
("type of packed component must have same scalar "
& "storage order as enclosing composite", Err_Node);
("type of packed component must have same scalar storage "
& "order as enclosing composite", Err_Node);
-- Reject if composite is a packed array, as it may be rewritten
-- into an array of scalars.
elsif Is_Packed_Array (Encl_Type) then
Error_Msg_N ("type of packed array must have same scalar "
& "storage order as component", Err_Node);
Error_Msg_N
("type of packed array must have same scalar storage order "
& "as component", Err_Node);
-- Reject if not byte aligned
elsif Is_Record_Type (Encl_Type)
and then not Comp_Byte_Aligned
and then not Comp_Byte_Aligned
then
Error_Msg_N
("type of non-byte-aligned component must have same scalar "
......@@ -1304,8 +1305,8 @@ package body Freeze is
elsif Present (ADC) and then No (Comp_ADC) then
Error_Msg_NE
("scalar storage order specified for& doesn''t "
& "apply to component?", Err_Node, Encl_Type);
("scalar storage order specified for & does not apply to "
& "component?", Err_Node, Encl_Type);
end if;
end if;
......@@ -1314,8 +1315,8 @@ package body Freeze is
elsif Present (ADC) and then Component_Aliased then
Error_Msg_N
("aliased component not permitted for type with "
& "explicit Scalar_Storage_Order", Err_Node);
("aliased component not permitted for type with explicit "
& "Scalar_Storage_Order", Err_Node);
end if;
end Check_Component_Storage_Order;
......
......@@ -136,7 +136,7 @@ package body Repinfo is
-- a blank line precedes the output for a particular entity.
procedure List_Entities
(Ent : Entity_Id;
(Ent : Entity_Id;
Bytes_Big_Endian : Boolean;
In_Subprogram : Boolean := False);
-- This procedure lists the entities associated with the entity E, starting
......@@ -320,7 +320,7 @@ package body Repinfo is
-------------------
procedure List_Entities
(Ent : Entity_Id;
(Ent : Entity_Id;
Bytes_Big_Endian : Boolean;
In_Subprogram : Boolean := False)
is
......
......@@ -255,7 +255,8 @@ package body System.Storage_Pools.Subpools is
-- Step 4: Attachment
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
-- top of the allocated bits into a list header. If there is padding
......@@ -273,8 +274,8 @@ package body System.Storage_Pools.Subpools is
-- | |
-- +- Header_And_Padding --+
N_Ptr := Address_To_FM_Node_Ptr
(N_Addr + Header_And_Padding - Header_Size);
N_Ptr :=
Address_To_FM_Node_Ptr (N_Addr + Header_And_Padding - Header_Size);
-- Prepend the allocated object to the finalization master
......@@ -330,7 +331,9 @@ package body System.Storage_Pools.Subpools is
exception
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
Unlock_Task.all;
......@@ -443,7 +446,9 @@ package body System.Storage_Pools.Subpools is
exception
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;
raise;
......
......@@ -9446,9 +9446,9 @@ package body Sem_Res is
Apply_Scalar_Range_Check (Expr, Typ);
end if;
-- Finally, check whether a predicate applies to the target type.
-- This comes from AI12-0100. As for type conversions, check the
-- enclosing context to prevent an infinite expansion.
-- Finally, check whether a predicate applies to the target type. This
-- comes from AI12-0100. As for type conversions, check the enclosing
-- context to prevent an infinite expansion.
if Has_Predicates (Target_Typ) then
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