From 6d0289b1ec9e1f2b963d6dc6bb5cf262913c429c Mon Sep 17 00:00:00 2001 From: Hristian Kirtchev Date: Fri, 5 Jul 2019 07:03:25 +0000 Subject: [PATCH] [Ada] Minor reformatting 2019-07-05 Hristian Kirtchev gcc/ada/ * 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. From-SVN: r273123 --- gcc/ada/ChangeLog | 7 +++++++ gcc/ada/bindo-units.adb | 2 -- gcc/ada/checks.adb | 2 +- gcc/ada/exp_attr.adb | 3 ++- gcc/ada/exp_ch3.adb | 6 +++--- gcc/ada/exp_ch4.adb | 4 ++-- gcc/ada/exp_pakd.adb | 5 +++-- gcc/ada/lib-writ.adb | 2 +- gcc/ada/libgnat/g-traceb.adb | 6 ++++-- gcc/ada/libgnat/g-traceb.ads | 3 ++- gcc/ada/libgnat/s-stratt.ads | 2 +- gcc/ada/sem_aux.ads | 2 +- gcc/ada/sem_util.adb | 24 ++++++++++++++---------- 13 files changed, 41 insertions(+), 27 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index c5dcd039079..1899bffd697 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2019-07-05 Hristian Kirtchev + + * 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 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that diff --git a/gcc/ada/bindo-units.adb b/gcc/ada/bindo-units.adb index d2501e062fe..f234f40a383 100644 --- a/gcc/ada/bindo-units.adb +++ b/gcc/ada/bindo-units.adb @@ -45,8 +45,6 @@ package body Bindo.Units is -- The following set stores all units the need to be elaborated - -- Kirchev - Elaborable_Units : Unit_Sets.Membership_Set := Unit_Sets.Nil; ----------------------- diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 8176f859061..ec4e96ff613 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -2722,7 +2722,7 @@ package body Checks is then declare In_Body : Boolean := False; - P : Node_Id := Parent (N); + P : Node_Id := Parent (N); begin while Present (P) loop diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index a4350cafaec..ac99ec13469 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -3997,8 +3997,9 @@ package body Exp_Attr is 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 diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index e48c18888c6..834aaa3a18f 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -9550,9 +9550,9 @@ package body Exp_Ch3 is 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); diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 7a048c618e9..a611e03c47a 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -11471,8 +11471,8 @@ package body Exp_Ch4 is 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 diff --git a/gcc/ada/exp_pakd.adb b/gcc/ada/exp_pakd.adb index 9a659fa3371..f6a7eedeea0 100644 --- a/gcc/ada/exp_pakd.adb +++ b/gcc/ada/exp_pakd.adb @@ -1150,8 +1150,9 @@ package body Exp_Pakd is 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 diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb index 861d58eaf96..31ef8e2feba 100644 --- a/gcc/ada/lib-writ.adb +++ b/gcc/ada/lib-writ.adb @@ -1081,7 +1081,7 @@ package body Lib.Writ is 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; diff --git a/gcc/ada/libgnat/g-traceb.adb b/gcc/ada/libgnat/g-traceb.adb index f40d84ef66e..9cf04de5ec9 100644 --- a/gcc/ada/libgnat/g-traceb.adb +++ b/gcc/ada/libgnat/g-traceb.adb @@ -41,13 +41,15 @@ package body GNAT.Traceback is 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; diff --git a/gcc/ada/libgnat/g-traceb.ads b/gcc/ada/libgnat/g-traceb.ads index bdd46b25cce..6a565c9a3a6 100644 --- a/gcc/ada/libgnat/g-traceb.ads +++ b/gcc/ada/libgnat/g-traceb.ads @@ -99,7 +99,8 @@ package GNAT.Traceback is -- 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 diff --git a/gcc/ada/libgnat/s-stratt.ads b/gcc/ada/libgnat/s-stratt.ads index 20dc4e62c2b..e050bc1d8b4 100644 --- a/gcc/ada/libgnat/s-stratt.ads +++ b/gcc/ada/libgnat/s-stratt.ads @@ -154,7 +154,7 @@ package System.Stream_Attributes is 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. diff --git a/gcc/ada/sem_aux.ads b/gcc/ada/sem_aux.ads index ec0f5e7c8f7..f3b7f2469ff 100644 --- a/gcc/ada/sem_aux.ads +++ b/gcc/ada/sem_aux.ads @@ -87,7 +87,7 @@ package Sem_Aux is ----------------- 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. diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 48822e2e3f7..67bc4de39c4 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -6576,13 +6576,15 @@ package body Sem_Util is -- 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 @@ -6591,8 +6593,9 @@ package body Sem_Util is 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; @@ -6899,8 +6902,9 @@ package body Sem_Util is 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; @@ -6954,7 +6958,7 @@ package body Sem_Util is 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 -- 2.30.2