From e5fc017905d64f59f189bf9453978fa158a289e6 Mon Sep 17 00:00:00 2001 From: Hristian Kirtchev Date: Tue, 22 May 2018 13:18:45 +0000 Subject: [PATCH] [Ada] Minor reformattings 2018-05-22 Hristian Kirtchev gcc/ada/ * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor reformattings. From-SVN: r260508 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/exp_ch5.adb | 4 ++-- gcc/ada/freeze.adb | 2 +- gcc/ada/pprint.adb | 22 +++++++++++++++------- gcc/ada/sem_ch4.adb | 14 +++++++------- gcc/ada/sem_res.adb | 20 +++++++++----------- 6 files changed, 39 insertions(+), 28 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 6341af867cc..0502e8fcee3 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-05-22 Hristian Kirtchev + + * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor + reformattings. + 2018-05-22 Justin Squirek * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util. diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index ff6bcc6211c..81fb162f39d 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -238,8 +238,8 @@ package body Exp_Ch5 is Statements => Stats, End_Label => Empty); - -- If the contruct has a specified loop name, preserve it in the - -- new loop, for possible use in exit statements. + -- If the contruct has a specified loop name, preserve it in the new + -- loop, for possible use in exit statements. if Present (Identifier (N)) and then Comes_From_Source (Identifier (N)) diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 9a67061e3fc..44067e1b3e0 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -8697,7 +8697,7 @@ package body Freeze is and then not Is_Imported (Ent) and then not Initialization_Suppressed (Typ) and then not (Ekind (Ent) = E_Variable - and then Initialization_Suppressed (Ent)) + and then Initialization_Suppressed (Ent)) and then (Has_Non_Null_Base_Init_Proc (Typ) or else Is_Access_Type (Typ) or else (Normalize_Scalars diff --git a/gcc/ada/pprint.adb b/gcc/ada/pprint.adb index e66de36005f..75c32e4d7e5 100644 --- a/gcc/ada/pprint.adb +++ b/gcc/ada/pprint.adb @@ -277,9 +277,14 @@ package body Pprint is -- Transform given string into the corresponding one in -- mixed case form. + ------------------- + -- To_Mixed_Case -- + ------------------- + function To_Mixed_Case (S : String) return String is - Ucase : Boolean := True; Result : String (S'Range); + Ucase : Boolean := True; + begin for J in S'Range loop if Ucase then @@ -294,14 +299,17 @@ package body Pprint is return Result; end To_Mixed_Case; - Id : constant Attribute_Id := - Get_Attribute_Id (Attribute_Name (Expr)); + Id : constant Attribute_Id := + Get_Attribute_Id (Attribute_Name (Expr)); -- Always use mixed case for attributes - Str : constant String := - Expr_Name (Prefix (Expr)) & "'" - & To_Mixed_Case (Get_Name_String - (Attribute_Name (Expr))); + + Str : constant String := + Expr_Name (Prefix (Expr)) + & "'" + & To_Mixed_Case + (Get_Name_String (Attribute_Name (Expr))); + N : Node_Id; Ranges : List_Id; diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 2452cf9cd47..0d77ad1562b 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -3217,15 +3217,15 @@ package body Sem_Ch4 is or else Nkind (Original_Node (N)) = N_Selected_Component or else (Nkind (Original_Node (N)) = N_Indexed_Component - and then Nkind (Prefix (Original_Node (N))) - = N_Selected_Component) + and then Nkind (Prefix (Original_Node (N))) = + N_Selected_Component) or else (Nkind (Parent (N)) = N_Function_Call - and then Is_Array_Type (Etype (Name (N))) - and then Etype (Original_Node (N)) = - Component_Type (Etype (Name (N))) - and then Nkind (Original_Node (Parent (N))) - = N_Selected_Component); + and then Is_Array_Type (Etype (Name (N))) + and then Etype (Original_Node (N)) = + Component_Type (Etype (Name (N))) + and then Nkind (Original_Node (Parent (N))) = + N_Selected_Component); -- The first formal must be omitted from the match when trying to find -- a primitive operation that is a possible interpretation, and also diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index d31aca2b056..41de3fe4e62 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -13011,18 +13011,15 @@ package body Sem_Res is -- Here we have a real conversion error else + -- Check for missing regular with_clause when only a limited view of + -- target is available. - -- Check for missing regular with_clause when only a limited view - -- of target is available. - - if From_Limited_With (Opnd_Type) - and then In_Package_Body - then + if From_Limited_With (Opnd_Type) and then In_Package_Body then Conversion_Error_NE ("invalid conversion, not compatible with limited view of }", - N, Opnd_Type); - Conversion_Error_NE ("\add with_clause for& to current unit!", N, - Scope (Opnd_Type)); + N, Opnd_Type); + Conversion_Error_NE + ("\add with_clause for& to current unit!", N, Scope (Opnd_Type)); elsif Is_Access_Type (Opnd_Type) and then From_Limited_With (Designated_Type (Opnd_Type)) @@ -13030,8 +13027,9 @@ package body Sem_Res is then Conversion_Error_NE ("invalid conversion, not compatible with }", N, Opnd_Type); - Conversion_Error_NE ("\add with_clause for& to current unit!", N, - Scope (Designated_Type (Opnd_Type))); + Conversion_Error_NE + ("\add with_clause for& to current unit!", + N, Scope (Designated_Type (Opnd_Type))); else Conversion_Error_NE -- 2.30.2