Commit b6784d90 by Hristian Kirtchev Committed by Pierre-Marie de Rodat

[Ada] Minor reformatting

2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.

From-SVN: r260658
parent 861e589e
2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
2018-05-24 Ed Schonberg <schonberg@adacore.com> 2018-05-24 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Flatten): Add a warning on an others clause in an array * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
......
...@@ -1781,15 +1781,20 @@ package body Exp_Ch7 is ...@@ -1781,15 +1781,20 @@ package body Exp_Ch7 is
if Present (Mark_Id) then if Present (Mark_Id) then
declare declare
Release : Node_Id := Release : Node_Id := Build_SS_Release_Call (Loc, Mark_Id);
Build_SS_Release_Call (Loc, Mark_Id);
begin begin
-- If this is a build-in-place function, then we need to -- If the context is a build-in-place function, the secondary
-- release the secondary stack, unless we are returning on the -- stack must be released, unless the build-in-place function
-- secondary stack. We wrap the release call in: -- itself is returning on the secondary stack. Generate:
-- if BIP_Alloc_Form /= Secondary_Stack then ... --
-- If we are returning on the secondary stack, then releasing -- if BIP_Alloc_Form /= Secondary_Stack then
-- is the caller's responsibility (or caller's caller, or ...). -- SS_Release (Mark_Id);
-- end if;
--
-- Note that if the function returns on the secondary stack,
-- then the responsibility of reclaiming the space is always
-- left to the caller (recursively if needed).
if Nkind (N) = N_Subprogram_Body then if Nkind (N) = N_Subprogram_Body then
declare declare
...@@ -1802,7 +1807,7 @@ package body Exp_Ch7 is ...@@ -1802,7 +1807,7 @@ package body Exp_Ch7 is
if BIP_SS then if BIP_SS then
Release := Release :=
Make_If_Statement (Loc, Make_If_Statement (Loc,
Condition => Condition =>
Make_Op_Ne (Loc, Make_Op_Ne (Loc,
Left_Opnd => Left_Opnd =>
New_Occurrence_Of New_Occurrence_Of
...@@ -1810,8 +1815,9 @@ package body Exp_Ch7 is ...@@ -1810,8 +1815,9 @@ package body Exp_Ch7 is
(Spec_Id, BIP_Alloc_Form), Loc), (Spec_Id, BIP_Alloc_Form), Loc),
Right_Opnd => Right_Opnd =>
Make_Integer_Literal (Loc, Make_Integer_Literal (Loc,
UI_From_Int (BIP_Allocation_Form'Pos UI_From_Int
(Secondary_Stack)))), (BIP_Allocation_Form'Pos
(Secondary_Stack)))),
Then_Statements => New_List (Release)); Then_Statements => New_List (Release));
end if; end if;
......
...@@ -7862,7 +7862,7 @@ package body Sem_Ch3 is ...@@ -7862,7 +7862,7 @@ package body Sem_Ch3 is
if Present (Full_View (Parent_Type)) if Present (Full_View (Parent_Type))
and then not Is_Itype (Derived_Type) and then not Is_Itype (Derived_Type)
and then not (Is_Concurrent_Type (Full_View (Parent_Type))) and then not Is_Concurrent_Type (Full_View (Parent_Type))
then then
declare declare
Der_Base : constant Entity_Id := Base_Type (Derived_Type); Der_Base : constant Entity_Id := Base_Type (Derived_Type);
...@@ -13444,7 +13444,7 @@ package body Sem_Ch3 is ...@@ -13444,7 +13444,7 @@ package body Sem_Ch3 is
if Is_Itype (Def_Id) and then Has_Predicates (T) then if Is_Itype (Def_Id) and then Has_Predicates (T) then
Inherit_Predicate_Flags (Def_Id, T); Inherit_Predicate_Flags (Def_Id, T);
-- Indicate where the predicate function may be found. -- Indicate where the predicate function may be found
if Is_Itype (T) then if Is_Itype (T) then
if Present (Predicate_Function (Def_Id)) then if Present (Predicate_Function (Def_Id)) then
...@@ -21759,7 +21759,7 @@ package body Sem_Ch3 is ...@@ -21759,7 +21759,7 @@ package body Sem_Ch3 is
if Has_Predicates (Subtype_Mark_Id) then if Has_Predicates (Subtype_Mark_Id) then
Inherit_Predicate_Flags (Def_Id, Subtype_Mark_Id); Inherit_Predicate_Flags (Def_Id, Subtype_Mark_Id);
-- Indicate where the predicate function may be found. -- Indicate where the predicate function may be found
if No (Predicate_Function (Def_Id)) then if No (Predicate_Function (Def_Id)) then
Set_Predicated_Parent (Def_Id, Subtype_Mark_Id); Set_Predicated_Parent (Def_Id, Subtype_Mark_Id);
......
...@@ -7293,9 +7293,9 @@ package body Sem_Res is ...@@ -7293,9 +7293,9 @@ package body Sem_Res is
end if; end if;
end if; end if;
-- We may be resolving an entity within expanded code, so a reference -- We may be resolving an entity within expanded code, so a reference to
-- to an entity should be ignored when calculating effective use clauses -- an entity should be ignored when calculating effective use clauses to
-- to avoid inappropriate marking. -- avoid inappropriate marking.
if Comes_From_Source (N) then if Comes_From_Source (N) then
Mark_Use_Clauses (E); Mark_Use_Clauses (E);
......
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