From: Hristian Kirtchev Date: Fri, 23 Oct 2015 12:39:08 +0000 (+0000) Subject: exp_attr.adb, [...]: Minor reformatting. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3bf0d9a5805754b9cc449b8d8d5c64d9e98361a;p=gcc.git exp_attr.adb, [...]: Minor reformatting. 2015-10-23 Hristian Kirtchev * exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb, gnatname.adb: Minor reformatting. From-SVN: r229244 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7d6f607ec1f..a4dbbe5f72e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2015-10-23 Hristian Kirtchev + + * exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb, + gnatname.adb: Minor reformatting. + 2015-10-23 Steve Baird * a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads, diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 4864fbfbb22..f09759702aa 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -6509,9 +6509,10 @@ package body Exp_Aggr is Into => Target, Scalar_Comp => Is_Scalar_Type (Component_Type (Typ)), Indexes => No_List); - else - -- Directly or indirectly (e.g. access protected procedure) a record + -- Directly or indirectly (e.g. access protected procedure) a record + + else Aggr_Code := Build_Record_Aggr_Code (N, Typ, Target); end if; diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index e602b4ba12b..51297ec4132 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -1473,22 +1473,25 @@ package body Exp_Attr is declare T1 : constant Entity_Id := Make_Temporary (Loc, 'T', Left); T2 : constant Entity_Id := Make_Temporary (Loc, 'T', Right); + begin Rewrite (N, Make_Expression_With_Actions (Loc, - Actions => New_List ( + Actions => New_List ( Make_Object_Declaration (Loc, Defining_Identifier => T1, + Constant_Present => True, Object_Definition => New_Occurrence_Of (Etype (Left), Loc), - Constant_Present => True, Expression => Relocate_Node (Left)), + Make_Object_Declaration (Loc, Defining_Identifier => T2, + Constant_Present => True, Object_Definition => New_Occurrence_Of (Etype (Right), Loc), - Constant_Present => True, Expression => Relocate_Node (Right))), + Expression => Make_If_Expression (Loc, Expressions => New_List ( diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 91ff7a0eaae..081d7513c53 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -3356,8 +3356,9 @@ package body Freeze is and then not Has_Warnings_Off (E) and then not Has_Warnings_Off (R_Type) then - Error_Msg_N ("?x?foreign convention function& should not " & - "return unconstrained array!", E); + Error_Msg_N + ("?x?foreign convention function& should not return " + & "unconstrained array!", E); end if; end if; @@ -4266,7 +4267,7 @@ package body Freeze is end if; end if; - -- The following checks are only relevant when SPARK_Mode is on as + -- The following checks are relevant only when SPARK_Mode is on as -- they are not standard Ada legality rules. if SPARK_Mode = On then diff --git a/gcc/ada/gnatname.adb b/gcc/ada/gnatname.adb index 5af5d537227..a01bbb20eeb 100644 --- a/gcc/ada/gnatname.adb +++ b/gcc/ada/gnatname.adb @@ -613,22 +613,22 @@ begin declare Gnatname : constant String_Access := Program_Name ("gnatname", "gnatname"); + Arg_Len : Positive := Argument_Count; Target : String_Access := null; - Arg_Len : Positive := Argument_Count; begin -- Find the target, if any if Gnatname.all /= "gnatname" then - Target := new String'(Gnatname - (Gnatname'First .. Gnatname'Last - 9)); + Target := + new String'(Gnatname (Gnatname'First .. Gnatname'Last - 9)); Arg_Len := Arg_Len + 1; end if; declare + Args : Argument_List (1 .. Arg_Len); Gprname : String_Access := - Locate_Exec_On_Path (Exec_Name => "gprname"); - Args : Argument_List (1 .. Arg_Len); + Locate_Exec_On_Path (Exec_Name => "gprname"); Success : Boolean; begin @@ -640,8 +640,7 @@ begin -- Add the target if there is one if Target /= null then - Args (Args'Last) := - new String'("--target=" & Target.all); + Args (Args'Last) := new String'("--target=" & Target.all); end if; Spawn (Gprname.all, Args, Success); @@ -656,19 +655,19 @@ begin end; end if; - if Create_Project then - -- This only happens if gprname is not found or if the invocation of - -- gprname did not succeed. + -- This only happens if gprname is not found or if the invocation of + -- gprname did not succeed. + if Create_Project then Write_Line - ("warning: gnatname -P is obsolete and will not be available " - & "in the next release; use gprname instead"); + ("warning: gnatname -P is obsolete and will not be available in the " + & "next release; use gprname instead"); end if; -- If no Ada or foreign pattern was specified, print the usage and return if Patterns.Last (Arguments.Table (Arguments.Last).Name_Patterns) = 0 - and then + and then Patterns.Last (Arguments.Table (Arguments.Last).Foreign_Patterns) = 0 then if Argument_Count = 0 then @@ -685,9 +684,7 @@ begin -- information, the current directory is the directory of the specified -- file. - if Patterns.Last - (Arguments.Table (Arguments.Last).Directories) = 0 - then + if Patterns.Last (Arguments.Table (Arguments.Last).Directories) = 0 then Patterns.Append (Arguments.Table (Arguments.Last).Directories, new String'(".")); end if; diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 948d71af0fa..21b66d49313 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -4312,10 +4312,10 @@ package body Sem_Attr is Stmt := Parent (Stmt); end loop; - -- Loop_Entry must appear within a Loop_Assertion pragma (Assert, - -- Assert_And_Cut, Assume count as loop assertion pragmas for this - -- purpose if they appear in an appropriate location in a loop, - -- which was already checked by the top level pragma circuit). + -- Loop_Entry must appear within a Loop_Assertion pragma (Assert, + -- Assert_And_Cut, Assume count as loop assertion pragmas for this + -- purpose if they appear in an appropriate location in a loop, + -- which was already checked by the top level pragma circuit). if No (Enclosing_Pragma) then Error_Attr ("attribute% must appear within appropriate pragma", N);