+2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
+ exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
+ libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
+ sem_util.adb: Minor reformatting.
+
2019-07-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Build_Predicate_Functions): If a subtype that
-- The following set stores all units the need to be elaborated
- -- Kirchev
-
Elaborable_Units : Unit_Sets.Membership_Set := Unit_Sets.Nil;
-----------------------
then
declare
In_Body : Boolean := False;
- P : Node_Id := Parent (N);
+ P : Node_Id := Parent (N);
begin
while Present (P) loop
declare
Rtyp : constant Entity_Id := Root_Type (P_Type);
+
+ Expr : Node_Id; -- call to Descendant_Tag
Get_Tag : Node_Id; -- expression to read the 'Tag
- Expr : Node_Id; -- call to Descendant_Tag
begin
-- Read the internal tag (RM 13.13.2(34)) and use it to
if No (Eq_Call) then
Next_Test := Make_Op_Ne (Loc, Lhs, Rhs);
- -- If a component has a defined abstract equality,
- -- its application raises Program_Error on that
- -- component and therefore on the current variant.
+ -- If a component has a defined abstract equality, its
+ -- application raises Program_Error on that component
+ -- and therefore on the current variant.
elsif Nkind (Eq_Call) = N_Raise_Program_Error then
Set_Etype (Eq_Call, Standard_Boolean);
then
if not Comes_From_Source (N)
and then Nkind_In (Parent (N), N_Function_Call,
- N_Procedure_Call_Statement,
- N_Parameter_Association)
+ N_Parameter_Association,
+ N_Procedure_Call_Statement)
and then Is_Interface (Designated_Type (Target_Type))
and then Is_Class_Wide_Type (Designated_Type (Target_Type))
then
Expr := First (Expressions (Lhs));
while Present (Expr) loop
declare
- Loc : constant Source_Ptr := Sloc (Expr);
- Expr_Typ : constant Entity_Id := Etype (Expr);
+ Expr_Typ : constant Entity_Id := Etype (Expr);
+ Loc : constant Source_Ptr := Sloc (Expr);
+
Expr_Copy : Node_Id;
begin
begin
-- We never write an ALI file if the original operating mode was
- -- syntax-only (-gnats switch used in compiler invocation line)
+ -- syntax-only (-gnats switch used in compiler invocation line).
if Original_Operating_Mode = Check_Syntax then
return;
procedure Call_Chain
(Traceback : out Tracebacks_Array;
- Len : out Natural) is
+ Len : out Natural)
+ is
begin
System.Traceback.Call_Chain (Traceback, Traceback'Length, Len);
end Call_Chain;
function Call_Chain
- (Max_Len : Positive; Skip_Frames : Natural := 1) return Tracebacks_Array
+ (Max_Len : Positive;
+ Skip_Frames : Natural := 1) return Tracebacks_Array
is
Traceback : Tracebacks_Array (1 .. Max_Len);
Len : Natural;
-- are undefined on return.
function Call_Chain
- (Max_Len : Positive; Skip_Frames : Natural := 1) return Tracebacks_Array;
+ (Max_Len : Positive;
+ Skip_Frames : Natural := 1) return Tracebacks_Array;
-- Returns up to Max_Len tracebacks corresponding to the current call
-- chain. Result array order is the same as in above procedure Call_Chain
-- except that Skip_Frames says how many of the most recent calls should be
function Block_IO_OK return Boolean;
-- Package System.Stream_Attributes has several bodies - the default one
- -- distributed with GNAT, and s-stratt-xdr.adb, which is based on the XDR
+ -- distributed with GNAT, and s-stratt__xdr.adb, which is based on the XDR
-- standard. Both bodies share the same spec. The role of this function is
-- to indicate whether the current version of System.Stream_Attributes
-- supports block IO. See System.Strings.Stream_Ops (s-ststop) for details.
-----------------
function Ancestor_Subtype (Typ : Entity_Id) return Entity_Id;
- -- The argument Id is a type or subtype entity. If the argument is a
+ -- The argument Typ is a type or subtype entity. If the argument is a
-- subtype then it returns the subtype or type from which the subtype was
-- obtained, otherwise it returns Empty.
-- the accessibility level is that of the declaration of the
-- stand-alone object.
- return Make_Level_Literal
- (Object_Access_Level
- (Defining_Identifier (Parent (N))));
+ return
+ Make_Level_Literal
+ (Object_Access_Level
+ (Defining_Identifier (Parent (N))));
when N_Assignment_Statement =>
- return Make_Level_Literal
- (Object_Access_Level (Name (Parent (N))));
+ return
+ Make_Level_Literal
+ (Object_Access_Level (Name (Parent (N))));
when others =>
declare
begin
Error_Msg_Strlen := S'Length;
Error_Msg_String (1 .. Error_Msg_Strlen) := S;
- Error_Msg_N ("unsupported context for anonymous " &
- "allocator (~)", Parent (N));
+ Error_Msg_N
+ ("unsupported context for anonymous allocator (~)",
+ Parent (N));
end;
end case;
elsif Dynamic_Scope = Empty then
return Empty;
- elsif Ekind_In (Dynamic_Scope, E_Package, E_Package_Body,
- E_Generic_Package)
+ elsif Ekind_In (Dynamic_Scope, E_Generic_Package,
+ E_Package,
+ E_Package_Body)
then
return Dynamic_Scope;
elsif Ekind (Dyn_Scop) = E_Subprogram_Body then
return Corresponding_Spec (Parent (Parent (Dyn_Scop)));
- elsif Ekind_In (Dyn_Scop, E_Block, E_Return_Statement, E_Loop) then
+ elsif Ekind_In (Dyn_Scop, E_Block, E_Loop, E_Return_Statement) then
return Enclosing_Subprogram (Dyn_Scop);
elsif Ekind (Dyn_Scop) = E_Entry then