From 663afa9fac474647f69f242deab6bdc0bcaf1bf8 Mon Sep 17 00:00:00 2001 From: Hristian Kirtchev Date: Mon, 21 May 2018 14:51:25 +0000 Subject: [PATCH] [Ada] Minor reformatting 2018-05-21 Hristian Kirtchev gcc/ada/ * exp_ch3.adb: Minor reformatting. * exp_ch6.adb: Likewise. * freeze.adb: Likewise. * inline.adb: Likewise. * sem_util.adb: Likewise. From-SVN: r260459 --- gcc/ada/ChangeLog | 8 ++++++++ gcc/ada/exp_ch3.adb | 9 +++++---- gcc/ada/exp_ch6.adb | 2 +- gcc/ada/freeze.adb | 3 +-- gcc/ada/inline.adb | 2 +- gcc/ada/sem_util.adb | 8 ++------ 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 19b1278b9b3..0720a9c34ea 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2018-04-04 Hristian Kirtchev + + * exp_ch3.adb: Minor reformatting. + * exp_ch6.adb: Likewise. + * freeze.adb: Likewise. + * inline.adb: Likewise. + * sem_util.adb: Likewise. + 2018-04-04 Yannick Moy * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 78181730a3a..9d7fda4767d 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -6052,10 +6052,11 @@ package body Exp_Ch3 is and then not Has_Init_Expression (N) then Set_No_Initialization (N, False); - Set_Expression - (N, New_Copy_Tree - (Get_Simple_Init_Val (Typ, N, Esize (Def_Id)), - New_Sloc => Sloc (Obj_Def))); + Set_Expression (N, + New_Copy_Tree + (Source => Get_Simple_Init_Val (Typ, N, Esize (Def_Id)), + New_Sloc => Sloc (Obj_Def))); + Analyze_And_Resolve (Expression (N), Typ); end if; diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index c9d40433efd..21d87ef29dc 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -8439,7 +8439,7 @@ package body Exp_Ch6 is begin while Present (N) - and then Nkind_In (N, N_Pragma, N_Attribute_Reference) + and then Nkind_In (N, N_Attribute_Reference, N_Pragma) loop Analyze (N); D := N; diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 08163ef9062..958f3e08c05 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -716,9 +716,8 @@ package body Freeze is if Present (Init) and then (Nkind (Init) /= N_Function_Call - or else not Is_Expanded_Build_In_Place_Call (Init)) + or else not Is_Expanded_Build_In_Place_Call (Init)) then - -- Capture initialization value at point of declaration, and make -- explicit assignment legal, because object may be a constant. diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index e1c603f653e..72cb5c00ac2 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -2492,8 +2492,8 @@ package body Inline is -- type, because those must be resolved to a specific type. if Nkind_In (Expression (N), N_Aggregate, - N_Null, N_Character_Literal, + N_Null, N_String_Literal) or else Yields_Universal_Type (Expression (N)) then diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index cba7c467af0..55554417a85 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -19533,9 +19533,7 @@ package body Sem_Util is begin -- Discriminant_Constraint - if Is_Type (Id) - and then Has_Discriminants (Base_Type (Id)) - then + if Is_Type (Id) and then Has_Discriminants (Base_Type (Id)) then Set_Discriminant_Constraint (Id, Elist_Id ( Copy_Field_With_Replacement (Field => Union_Id (Discriminant_Constraint (Id)), @@ -19992,9 +19990,7 @@ package body Sem_Util is -- Discriminant_Constraint - if Is_Type (Id) - and then Has_Discriminants (Base_Type (Id)) - then + if Is_Type (Id) and then Has_Discriminants (Base_Type (Id)) then Visit_Field (Field => Union_Id (Discriminant_Constraint (Id)), Semantic => True); -- 2.30.2