From 3d581777692c6e9a03c380daf2c86a64f226850d Mon Sep 17 00:00:00 2001 From: Hristian Kirtchev Date: Wed, 23 May 2018 10:21:37 +0000 Subject: [PATCH] [Ada] Minor reformatting 2018-05-23 Hristian Kirtchev gcc/ada/ * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb: Minor reformatting. From-SVN: r260571 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/einfo.adb | 4 ++-- gcc/ada/exp_disp.adb | 31 ++++++++++++++++--------------- gcc/ada/sem_ch3.adb | 8 ++++---- gcc/ada/sem_ch6.adb | 8 ++++---- gcc/ada/sem_prag.adb | 7 +++---- 6 files changed, 34 insertions(+), 29 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 11a74a74a16..bb1e21f7082 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-05-23 Hristian Kirtchev + + * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb: + Minor reformatting. + 2018-05-22 Justin Squirek * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index a28cb4e2f73..339faa66c7a 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -253,13 +253,13 @@ package body Einfo is -- Access_Disp_Table_Elab_Flag Node30 -- Anonymous_Object Node30 -- Corresponding_Equality Node30 + -- Hidden_In_Formal_Instance Elist30 -- Last_Aggregate_Assignment Node30 -- Static_Initialization Node30 - -- Hidden_In_Formal_Instance Elist30 + -- Activation_Record_Component Node31 -- Derived_Type_Link Node31 -- Thunk_Entity Node31 - -- Activation_Record_Component Node31 -- Corresponding_Function Node32 -- Corresponding_Procedure Node32 diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index 2840c8ef91f..84add602c44 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -5021,7 +5021,7 @@ package body Exp_Disp is Constant_Present => True, Object_Definition => New_Occurrence_Of (RTE (RE_Address), Loc), - Expression => + Expression => Make_Attribute_Reference (Loc, Prefix => Make_Selected_Component (Loc, @@ -5033,7 +5033,8 @@ package body Exp_Disp is end if; end if; - -- Generate: Expanded_Name : constant String := ""; + -- Generate: + -- Expanded_Name : constant String := ""; if Global_Discard_Names or else Discard_Names (Typ) then Append_To (Result, @@ -5069,29 +5070,30 @@ package body Exp_Disp is if Expanded_Name /= External_Tag_Name then - -- Generate: External_Tag_Name : constant String := ""; + -- Generate: + -- External_Tag_Name : constant String := ""; if Present (No_Tagged_Streams_Pragma (Typ)) then Append_To (Result, Make_Object_Declaration (Loc, Defining_Identifier => External_Tag_Name, Constant_Present => True, - Object_Definition => New_Occurrence_Of - (Standard_String, Loc), - Expression => - Make_String_Literal (Loc, ""))); + Object_Definition => + New_Occurrence_Of (Standard_String, Loc), + Expression => Make_String_Literal (Loc, ""))); -- Generate: - -- External_Tag_Name : constant String := full_qualified_name (typ); + -- External_Tag_Name : constant String := + -- full_qualified_name (typ); else Append_To (Result, Make_Object_Declaration (Loc, Defining_Identifier => External_Tag_Name, Constant_Present => True, - Object_Definition => New_Occurrence_Of - (Standard_String, Loc), - Expression => + Object_Definition => + New_Occurrence_Of (Standard_String, Loc), + Expression => Make_String_Literal (Loc, Fully_Qualified_Name_String (First_Subtype (Typ))))); end if; @@ -5198,8 +5200,7 @@ package body Exp_Disp is New_Node := Unchecked_Convert_To (RTE (RE_Cstring_Ptr), Make_Attribute_Reference (Loc, - Prefix => New_Occurrence_Of - (External_Tag_Name, Loc), + Prefix => New_Occurrence_Of (External_Tag_Name, Loc), Attribute_Name => Name_Address)); -- External_Tag of a local tagged type @@ -5332,8 +5333,8 @@ package body Exp_Disp is New_Node := Unchecked_Convert_To (RTE (RE_Cstring_Ptr), Make_Attribute_Reference (Loc, - Prefix => New_Occurrence_Of - (External_Tag_Name, Loc), + Prefix => + New_Occurrence_Of (External_Tag_Name, Loc), Attribute_Name => Name_Address)); else Old_Val := Strval (Expr_Value_S (Expression (Def))); diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 83938c24b72..84e1fec7e4c 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -17981,16 +17981,16 @@ package body Sem_Ch3 is then Result := Search_Derivation_Levels (Ti, Stored_Constraint (Ti), True); + else declare Td : Entity_Id := Etype (Ti); begin - -- If the parent type is private, the full view may include - -- renamed discriminants, and it is those stored values - -- that may be needed (the partial view never has more - -- information than the full view). + -- renamed discriminants, and it is those stored values that + -- may be needed (the partial view never has more information + -- than the full view). if Is_Private_Type (Td) and then Present (Full_View (Td)) then Td := Full_View (Td); diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 1b31048f11d..ccd9bd5efb7 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -5396,12 +5396,12 @@ package body Sem_Ch6 is elsif Is_Formal_Subprogram (Old_Id) or else Is_Formal_Subprogram (New_Id) or else (Is_Subprogram (New_Id) - and then Present (Alias (New_Id)) - and then Is_Formal_Subprogram (Alias (New_Id))) + and then Present (Alias (New_Id)) + and then Is_Formal_Subprogram (Alias (New_Id))) then Conformance_Error - ("\formal subprograms are not subtype conformant " - & "(RM 6.3.1 (17/3))"); + ("\formal subprograms are not subtype conformant " + & "(RM 6.3.1 (17/3))"); end if; end if; diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 4e256d0db55..e25873b7165 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -21267,9 +21267,7 @@ package body Sem_Prag is end if; if In_Same_Declarative_Part (Parent (N), Orig_Def) then - Same_Decl := True; - Set_Is_Pure (Def_Id); if not Has_Pragma_Pure_Function (Def_Id) then @@ -21289,10 +21287,11 @@ package body Sem_Prag is Error_Msg_NE ("pragma Pure_Function on& is redundant?r?", N, Entity (E_Id)); + elsif not Same_Decl then Error_Pragma_Arg - ("pragma% argument must be in same declarative " - & "part", Arg1); + ("pragma% argument must be in same declarative part", + Arg1); end if; end if; end Pure_Function; -- 2.30.2