Commit 37368818 by Robert Dewar Committed by Arnaud Charlet

sem_aggr.adb, [...]: Minor reformatting & code reorganization.

2014-08-01  Robert Dewar  <dewar@adacore.com>

	* sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
	exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
	exp_ch3.adb: Minor reformatting & code reorganization.

From-SVN: r213439
parent e08add8e
2014-08-01 Robert Dewar <dewar@adacore.com> 2014-08-01 Robert Dewar <dewar@adacore.com>
* sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
exp_ch3.adb: Minor reformatting & code reorganization.
2014-08-01 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Remove VMS specific rules for pragma Ident. * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
* Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads, * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
......
...@@ -1163,9 +1163,9 @@ package body Exp_Aggr is ...@@ -1163,9 +1163,9 @@ package body Exp_Aggr is
if Needs_Finalization (Ctype) then if Needs_Finalization (Ctype) then
Append_To (L, Append_To (L,
Make_Init_Call ( Make_Init_Call
Obj_Ref => New_Copy_Tree (Indexed_Comp), (Obj_Ref => New_Copy_Tree (Indexed_Comp),
Typ => Ctype)); Typ => Ctype));
end if; end if;
else else
...@@ -1262,9 +1262,9 @@ package body Exp_Aggr is ...@@ -1262,9 +1262,9 @@ package body Exp_Aggr is
and then Nkind (Expr) = N_Aggregate) and then Nkind (Expr) = N_Aggregate)
then then
Append_To (L, Append_To (L,
Make_Adjust_Call ( Make_Adjust_Call
Obj_Ref => New_Copy_Tree (Indexed_Comp), (Obj_Ref => New_Copy_Tree (Indexed_Comp),
Typ => Comp_Type)); Typ => Comp_Type));
end if; end if;
end if; end if;
...@@ -1406,11 +1406,12 @@ package body Exp_Aggr is ...@@ -1406,11 +1406,12 @@ package body Exp_Aggr is
-- Construct the final loop -- Construct the final loop
Append_To (S, Make_Implicit_Loop_Statement Append_To (S,
(Node => N, Make_Implicit_Loop_Statement
Identifier => Empty, (Node => N,
Iteration_Scheme => L_Iteration_Scheme, Identifier => Empty,
Statements => L_Body)); Iteration_Scheme => L_Iteration_Scheme,
Statements => L_Body));
-- A small optimization: if the aggregate is initialized with a box -- A small optimization: if the aggregate is initialized with a box
-- and the component type has no initialization procedure, remove the -- and the component type has no initialization procedure, remove the
...@@ -1513,11 +1514,12 @@ package body Exp_Aggr is ...@@ -1513,11 +1514,12 @@ package body Exp_Aggr is
-- Construct the final loop -- Construct the final loop
Append_To (S, Make_Implicit_Loop_Statement Append_To (S,
(Node => N, Make_Implicit_Loop_Statement
Identifier => Empty, (Node => N,
Iteration_Scheme => W_Iteration_Scheme, Identifier => Empty,
Statements => W_Body)); Iteration_Scheme => W_Iteration_Scheme,
Statements => W_Body));
return S; return S;
end Gen_While; end Gen_While;
...@@ -1604,7 +1606,7 @@ package body Exp_Aggr is ...@@ -1604,7 +1606,7 @@ package body Exp_Aggr is
then then
Append_To (New_Code, Append_To (New_Code,
Make_Assignment_Statement (Loc, Make_Assignment_Statement (Loc,
Name => New_Copy_Tree (Into), Name => New_Copy_Tree (Into),
Expression => Expression =>
Unchecked_Convert_To (Typ, Unchecked_Convert_To (Typ,
Make_Integer_Literal (Loc, Uint_0)))); Make_Integer_Literal (Loc, Uint_0))));
...@@ -2186,7 +2188,7 @@ package body Exp_Aggr is ...@@ -2186,7 +2188,7 @@ package body Exp_Aggr is
Append_To (L, Append_To (L,
Make_Procedure_Call_Statement (Loc, Make_Procedure_Call_Statement (Loc,
Name => Name =>
New_Occurrence_Of New_Occurrence_Of
(Find_Prim_Op (Init_Typ, Name_Initialize), Loc), (Find_Prim_Op (Init_Typ, Name_Initialize), Loc),
Parameter_Associations => New_List (New_Copy_Tree (Ref)))); Parameter_Associations => New_List (New_Copy_Tree (Ref))));
...@@ -2510,9 +2512,9 @@ package body Exp_Aggr is ...@@ -2510,9 +2512,9 @@ package body Exp_Aggr is
and then not Is_Limited_Type (Etype (Ancestor)) and then not Is_Limited_Type (Etype (Ancestor))
then then
Append_To (Assign, Append_To (Assign,
Make_Adjust_Call ( Make_Adjust_Call
Obj_Ref => New_Copy_Tree (Ref), (Obj_Ref => New_Copy_Tree (Ref),
Typ => Etype (Ancestor))); Typ => Etype (Ancestor)));
end if; end if;
Append_To (L, Append_To (L,
...@@ -2628,9 +2630,8 @@ package body Exp_Aggr is ...@@ -2628,9 +2630,8 @@ package body Exp_Aggr is
if Nkind (N) = N_Aggregate then if Nkind (N) = N_Aggregate then
Append_To (L, Append_To (L,
Make_Procedure_Call_Statement (Loc, Make_Procedure_Call_Statement (Loc,
Name => Name =>
New_Occurrence_Of New_Occurrence_Of (Base_Init_Proc (CPP_Parent), Loc),
(Base_Init_Proc (CPP_Parent), Loc),
Parameter_Associations => New_List ( Parameter_Associations => New_List (
Unchecked_Convert_To (CPP_Parent, Unchecked_Convert_To (CPP_Parent,
New_Copy_Tree (Lhs))))); New_Copy_Tree (Lhs)))));
...@@ -2655,10 +2656,10 @@ package body Exp_Aggr is ...@@ -2655,10 +2656,10 @@ package body Exp_Aggr is
if Is_CPP_Constructor_Call (Expression (Comp)) then if Is_CPP_Constructor_Call (Expression (Comp)) then
Append_List_To (L, Append_List_To (L,
Build_Initialization_Call (Loc, Build_Initialization_Call (Loc,
Id_Ref => Make_Selected_Component (Loc, Id_Ref =>
Prefix => New_Copy_Tree (Target), Make_Selected_Component (Loc,
Selector_Name => Prefix => New_Copy_Tree (Target),
New_Occurrence_Of (Selector, Loc)), Selector_Name => New_Occurrence_Of (Selector, Loc)),
Typ => Etype (Selector), Typ => Etype (Selector),
Enclos_Type => Typ, Enclos_Type => Typ,
With_Default_Init => True, With_Default_Init => True,
...@@ -2911,13 +2912,13 @@ package body Exp_Aggr is ...@@ -2911,13 +2912,13 @@ package body Exp_Aggr is
and then not Is_Limited_Type (Comp_Type) and then not Is_Limited_Type (Comp_Type)
then then
Append_To (L, Append_To (L,
Make_Adjust_Call ( Make_Adjust_Call
Obj_Ref => New_Copy_Tree (Comp_Expr), (Obj_Ref => New_Copy_Tree (Comp_Expr),
Typ => Comp_Type)); Typ => Comp_Type));
end if; end if;
end if; end if;
-- ??? -- comment would be good here ???
elsif Ekind (Selector) = E_Discriminant elsif Ekind (Selector) = E_Discriminant
and then Nkind (N) /= N_Extension_Aggregate and then Nkind (N) /= N_Extension_Aggregate
...@@ -2955,9 +2956,9 @@ package body Exp_Aggr is ...@@ -2955,9 +2956,9 @@ package body Exp_Aggr is
Make_Raise_Constraint_Error (Loc, Make_Raise_Constraint_Error (Loc,
Condition => Condition =>
Make_Op_Ne (Loc, Make_Op_Ne (Loc,
Left_Opnd => New_Copy_Tree (Node (D_Val)), Left_Opnd => New_Copy_Tree (Node (D_Val)),
Right_Opnd => Expression (Comp)), Right_Opnd => Expression (Comp)),
Reason => CE_Discriminant_Check_Failed)); Reason => CE_Discriminant_Check_Failed));
else else
-- Find self-reference in previous discriminant assignment, -- Find self-reference in previous discriminant assignment,
...@@ -4199,7 +4200,7 @@ package body Exp_Aggr is ...@@ -4199,7 +4200,7 @@ package body Exp_Aggr is
Append_To (Indexes, Append_To (Indexes,
Make_Range (Loc, Make_Range (Loc,
Low_Bound => Make_Integer_Literal (Loc, 1), Low_Bound => Make_Integer_Literal (Loc, 1),
High_Bound => Make_Integer_Literal (Loc, Num))); High_Bound => Make_Integer_Literal (Loc, Num)));
end loop; end loop;
...@@ -4209,11 +4210,10 @@ package body Exp_Aggr is ...@@ -4209,11 +4210,10 @@ package body Exp_Aggr is
-- positional. Retrieve each dimension bounds (computed earlier). -- positional. Retrieve each dimension bounds (computed earlier).
for D in 1 .. Number_Dimensions (Typ) loop for D in 1 .. Number_Dimensions (Typ) loop
Append ( Append_To (Indexes,
Make_Range (Loc, Make_Range (Loc,
Low_Bound => Aggr_Low (D), Low_Bound => Aggr_Low (D),
High_Bound => Aggr_High (D)), High_Bound => Aggr_High (D)));
Indexes);
end loop; end loop;
end if; end if;
...@@ -6097,11 +6097,11 @@ package body Exp_Aggr is ...@@ -6097,11 +6097,11 @@ package body Exp_Aggr is
Discriminant := First_Stored_Discriminant (Base_Type (Typ)); Discriminant := First_Stored_Discriminant (Base_Type (Typ));
while Present (Discriminant) loop while Present (Discriminant) loop
New_Comp := New_Comp :=
New_Copy_Tree ( New_Copy_Tree
Get_Discriminant_Value ( (Get_Discriminant_Value
Discriminant, (Discriminant,
Typ, Typ,
Discriminant_Constraint (Typ))); Discriminant_Constraint (Typ)));
Append (New_Comp, Constraints); Append (New_Comp, Constraints);
Next_Stored_Discriminant (Discriminant); Next_Stored_Discriminant (Discriminant);
end loop; end loop;
...@@ -6173,8 +6173,7 @@ package body Exp_Aggr is ...@@ -6173,8 +6173,7 @@ package body Exp_Aggr is
Make_Component_Association (Loc, Make_Component_Association (Loc,
Choices => Choices =>
New_List (New_Occurrence_Of (Comp, Loc)), New_List (New_Occurrence_Of (Comp, Loc)),
Expression => Expression => New_Comp));
New_Comp));
Analyze_And_Resolve (New_Comp, Etype (Comp)); Analyze_And_Resolve (New_Comp, Etype (Comp));
end if; end if;
...@@ -7135,8 +7134,7 @@ package body Exp_Aggr is ...@@ -7135,8 +7134,7 @@ package body Exp_Aggr is
for I in UI_To_Int (Intval (Lo)) .. UI_To_Int (Intval (Hi)) for I in UI_To_Int (Intval (Lo)) .. UI_To_Int (Intval (Hi))
loop loop
Append_To Append_To (Expressions (Agg), New_Copy (Expression (Expr)));
(Expressions (Agg), New_Copy (Expression (Expr)));
-- The copied expression must be analyzed and resolved. -- The copied expression must be analyzed and resolved.
-- Besides setting the type, this ensures that static -- Besides setting the type, this ensures that static
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2006-2013, Free Software Foundation, Inc. -- -- Copyright (C) 2006-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -99,10 +99,11 @@ package body Exp_Atag is ...@@ -99,10 +99,11 @@ package body Exp_Atag is
Append_To (Stmts, Append_To (Stmts,
Make_Assignment_Statement (Loc, Make_Assignment_Statement (Loc,
Name => Make_Identifier (Loc, Name_uC), Name => Make_Identifier (Loc, Name_uC),
Expression => Expression =>
Make_Function_Call (Loc, Make_Function_Call (Loc,
Name => New_Occurrence_Of (RTE (RE_Get_Prim_Op_Kind), Loc), Name =>
New_Occurrence_Of (RTE (RE_Get_Prim_Op_Kind), Loc),
Parameter_Associations => New_List ( Parameter_Associations => New_List (
Tag_Node, Tag_Node,
Make_Identifier (Loc, Name_uS))))); Make_Identifier (Loc, Name_uS)))));
...@@ -415,9 +416,9 @@ package body Exp_Atag is ...@@ -415,9 +416,9 @@ package body Exp_Atag is
Append_To (Result, Append_To (Result,
Make_Assignment_Statement (Loc, Make_Assignment_Statement (Loc,
Name => Name =>
Make_Indexed_Component (Loc, Make_Indexed_Component (Loc,
Prefix => Prefix =>
Make_Explicit_Dereference (Loc, Make_Explicit_Dereference (Loc,
Unchecked_Convert_To Unchecked_Convert_To
(Node (Last_Elmt (Access_Disp_Table (Typ))), (Node (Last_Elmt (Access_Disp_Table (Typ))),
...@@ -428,7 +429,7 @@ package body Exp_Atag is ...@@ -428,7 +429,7 @@ package body Exp_Atag is
Expression => Expression =>
Unchecked_Convert_To (RTE (RE_Prim_Ptr), Unchecked_Convert_To (RTE (RE_Prim_Ptr),
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (E, Loc), Prefix => New_Occurrence_Of (E, Loc),
Attribute_Name => Name_Unrestricted_Access)))); Attribute_Name => Name_Unrestricted_Access))));
end if; end if;
...@@ -455,7 +456,7 @@ package body Exp_Atag is ...@@ -455,7 +456,7 @@ package body Exp_Atag is
if not CPP_Table (J) then if not CPP_Table (J) then
Prepend_To (Result, Prepend_To (Result,
Make_Assignment_Statement (Loc, Make_Assignment_Statement (Loc,
Name => Name =>
Make_Explicit_Dereference (Loc, Make_Explicit_Dereference (Loc,
Unchecked_Convert_To Unchecked_Convert_To
(Node (Last_Elmt (Access_Disp_Table (CPP_Typ))), (Node (Last_Elmt (Access_Disp_Table (CPP_Typ))),
...@@ -550,14 +551,14 @@ package body Exp_Atag is ...@@ -550,14 +551,14 @@ package body Exp_Atag is
Append_To (Result, Append_To (Result,
Make_Assignment_Statement (Loc, Make_Assignment_Statement (Loc,
Name => Name =>
Make_Indexed_Component (Loc, Make_Indexed_Component (Loc,
Prefix => Prefix =>
Make_Explicit_Dereference (Loc, Make_Explicit_Dereference (Loc,
Unchecked_Convert_To Unchecked_Convert_To
(Node (Node
(Last_Elmt (Last_Elmt
(Access_Disp_Table (Iface))), (Access_Disp_Table (Iface))),
New_Occurrence_Of (Typ_Tag, Loc))), New_Occurrence_Of (Typ_Tag, Loc))),
Expressions => Expressions =>
New_List New_List
...@@ -566,7 +567,7 @@ package body Exp_Atag is ...@@ -566,7 +567,7 @@ package body Exp_Atag is
Expression => Expression =>
Unchecked_Convert_To (RTE (RE_Prim_Ptr), Unchecked_Convert_To (RTE (RE_Prim_Ptr),
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (E, Loc), Prefix => New_Occurrence_Of (E, Loc),
Attribute_Name => Attribute_Name =>
Name_Unrestricted_Access)))); Name_Unrestricted_Access))));
end if; end if;
...@@ -584,7 +585,7 @@ package body Exp_Atag is ...@@ -584,7 +585,7 @@ package body Exp_Atag is
if not Prims_Table (J) then if not Prims_Table (J) then
Insert_After (Last_Nod, Insert_After (Last_Nod,
Make_Assignment_Statement (Loc, Make_Assignment_Statement (Loc,
Name => Name =>
Make_Explicit_Dereference (Loc, Make_Explicit_Dereference (Loc,
Unchecked_Convert_To Unchecked_Convert_To
(Node (Last_Elmt (Access_Disp_Table (Iface))), (Node (Last_Elmt (Access_Disp_Table (Iface))),
......
...@@ -459,14 +459,14 @@ package body Exp_Attr is ...@@ -459,14 +459,14 @@ package body Exp_Attr is
Append_To (Alt_List, Append_To (Alt_List,
Make_Case_Statement_Alternative (Loc, Make_Case_Statement_Alternative (Loc,
Discrete_Choices => New_Copy_List (Discrete_Choices (Variant)), Discrete_Choices => New_Copy_List (Discrete_Choices (Variant)),
Statements => Statements =>
Make_VS_Case (E, Component_List (Variant), Discrs))); Make_VS_Case (E, Component_List (Variant), Discrs)));
Next_Non_Pragma (Variant); Next_Non_Pragma (Variant);
end loop; end loop;
Append_To (Result, Append_To (Result,
Make_Case_Statement (Loc, Make_Case_Statement (Loc,
Expression => Expression =>
Make_Selected_Component (Loc, Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_X), Prefix => Make_Identifier (Loc, Name_X),
Selector_Name => New_Copy (Name (Variant_Part (CL)))), Selector_Name => New_Copy (Name (Variant_Part (CL)))),
......
...@@ -2350,8 +2350,7 @@ package body Exp_Ch3 is ...@@ -2350,8 +2350,7 @@ package body Exp_Ch3 is
if not Null_Present (Type_Definition (N)) then if not Null_Present (Type_Definition (N)) then
Append_List_To (Body_Stmts, Append_List_To (Body_Stmts,
Build_Init_Statements ( Build_Init_Statements (Component_List (Type_Definition (N))));
Component_List (Type_Definition (N))));
end if; end if;
-- N is a Derived_Type_Definition with a possible non-empty -- N is a Derived_Type_Definition with a possible non-empty
...@@ -4459,8 +4458,7 @@ package body Exp_Ch3 is ...@@ -4459,8 +4458,7 @@ package body Exp_Ch3 is
-- the case statement switch. Their value is added when an -- the case statement switch. Their value is added when an
-- equality call on unchecked unions is expanded. -- equality call on unchecked unions is expanded.
Append_List_To (Stmts, Append_List_To (Stmts, Make_Eq_Case (Typ, Comps, New_Discrs));
Make_Eq_Case (Typ, Comps, New_Discrs));
end; end;
-- Normal case (not unchecked union) -- Normal case (not unchecked union)
......
...@@ -10624,14 +10624,13 @@ package body Exp_Ch9 is ...@@ -10624,14 +10624,13 @@ package body Exp_Ch9 is
Params : constant List_Id := New_List; Params : constant List_Id := New_List;
begin begin
Append ( Append_To (Params,
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Qnam, Loc), Prefix => New_Occurrence_Of (Qnam, Loc),
Attribute_Name => Name_Unchecked_Access), Attribute_Name => Name_Unchecked_Access));
Params); Append_To (Params, Select_Mode);
Append (Select_Mode, Params); Append_To (Params, New_Occurrence_Of (Ann, Loc));
Append (New_Occurrence_Of (Ann, Loc), Params); Append_To (Params, New_Occurrence_Of (Xnam, Loc));
Append (New_Occurrence_Of (Xnam, Loc), Params);
return return
Make_Procedure_Call_Statement (Loc, Make_Procedure_Call_Statement (Loc,
...@@ -11351,6 +11350,7 @@ package body Exp_Ch9 is ...@@ -11351,6 +11350,7 @@ package body Exp_Ch9 is
Append (Cases, Stats); Append (Cases, Stats);
end; end;
end if; end if;
Append (End_Lab, Stats); Append (End_Lab, Stats);
-- Replace accept statement with appropriate block -- Replace accept statement with appropriate block
......
...@@ -2195,13 +2195,12 @@ package body Layout is ...@@ -2195,13 +2195,12 @@ package body Layout is
D_List := New_List; D_List := New_List;
D_Entity := First_Discriminant (E); D_Entity := First_Discriminant (E);
while Present (D_Entity) loop while Present (D_Entity) loop
Append ( Append_To (D_List,
Make_Selected_Component (Loc, Make_Selected_Component (Loc,
Prefix => Prefix =>
Make_Identifier (Loc, Vname), Make_Identifier (Loc, Vname),
Selector_Name => Selector_Name =>
New_Occurrence_Of (D_Entity, Loc)), New_Occurrence_Of (D_Entity, Loc)));
D_List);
D_Entity := Next_Discriminant (D_Entity); D_Entity := Next_Discriminant (D_Entity);
end loop; end loop;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -744,8 +744,8 @@ package body Nlists is ...@@ -744,8 +744,8 @@ package body Nlists is
else else
NL := New_List; NL := New_List;
E := First (List);
E := First (List);
while Present (E) loop while Present (E) loop
if Comes_From_Source (E) then if Comes_From_Source (E) then
Append (New_Copy (E), NL); Append (New_Copy (E), NL);
......
...@@ -225,9 +225,9 @@ package Nlists is ...@@ -225,9 +225,9 @@ package Nlists is
procedure Append (Node : Node_Or_Entity_Id; To : List_Id); procedure Append (Node : Node_Or_Entity_Id; To : List_Id);
-- Appends Node at the end of node list To. Node must be a non-empty node -- Appends Node at the end of node list To. Node must be a non-empty node
-- that is not already a member of a node list, and To must be a -- that is not already a member of a node list, and To must be a node list.
-- node list. An attempt to append an error node is ignored without -- An attempt to append an error node is ignored without complaint and the
-- complaint and the list is unchanged. -- list is unchanged.
procedure Append_To (To : List_Id; Node : Node_Or_Entity_Id); procedure Append_To (To : List_Id; Node : Node_Or_Entity_Id);
pragma Inline (Append_To); pragma Inline (Append_To);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -168,6 +168,7 @@ package body Ch12 is ...@@ -168,6 +168,7 @@ package body Ch12 is
if Token = Tok_Use then if Token = Tok_Use then
Append (P_Use_Clause, Decls); Append (P_Use_Clause, Decls);
else else
-- Parse a generic parameter declaration -- Parse a generic parameter declaration
......
...@@ -4355,13 +4355,12 @@ package body Sem_Aggr is ...@@ -4355,13 +4355,12 @@ package body Sem_Aggr is
end if; end if;
if Needs_Box then if Needs_Box then
Append Append_To (Component_Associations (Aggr),
(Make_Component_Association (Loc, Make_Component_Association (Loc,
Choices => Choices =>
New_List (Make_Others_Choice (Loc)), New_List (Make_Others_Choice (Loc)),
Expression => Empty, Expression => Empty,
Box_Present => True), Box_Present => True));
Component_Associations (Aggr));
end if; end if;
end Propagate_Discriminants; end Propagate_Discriminants;
...@@ -4400,14 +4399,14 @@ package body Sem_Aggr is ...@@ -4400,14 +4399,14 @@ package body Sem_Aggr is
while Present (Comp) loop while Present (Comp) loop
if Ekind (Comp) = E_Component then if Ekind (Comp) = E_Component then
if not Is_Record_Type (Etype (Comp)) then if not Is_Record_Type (Etype (Comp)) then
Append Append_To
(Make_Component_Association (Loc, (Component_Associations (Expr),
Make_Component_Association (Loc,
Choices => Choices =>
New_List New_List
(Make_Others_Choice (Loc)), (Make_Others_Choice (Loc)),
Expression => Empty, Expression => Empty,
Box_Present => True), Box_Present => True));
Component_Associations (Expr));
end if; end if;
exit; exit;
end if; end if;
......
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