From 573e5dd6ace97bde5d1ab096ae2c4f8c02534a17 Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Tue, 10 Sep 2013 14:52:46 +0000 Subject: sem_ch3.adb, [...]: Minor reformatting. 2013-09-10 Robert Dewar * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb, exp_ch4.adb, sprint.adb: Minor reformatting. From-SVN: r202455 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/einfo.ads | 1 + gcc/ada/exp_ch4.adb | 32 +++++++++++++++++--------------- gcc/ada/exp_ch9.adb | 20 +++++++++++++++----- gcc/ada/sem_ch12.adb | 1 - gcc/ada/sem_ch3.adb | 17 +++++++++++------ gcc/ada/sem_prag.adb | 4 +--- gcc/ada/sinfo.ads | 9 ++++----- gcc/ada/sprint.adb | 4 ++-- 9 files changed, 56 insertions(+), 37 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3c9757d..51352d1 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2013-09-10 Robert Dewar + + * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb, + exp_ch4.adb, sprint.adb: Minor reformatting. + 2013-09-10 Yannick Moy * sinfo.ads: Document splitting of pre/post in N_Contract description. diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 24bb12c..69a0d7e 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -1,6 +1,7 @@ ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- +-- -- -- E I N F O -- -- -- -- S p e c -- diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index ffb49cb..0802f2d 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -8125,14 +8125,15 @@ package body Exp_Ch4 is and then not Non_Binary_Modulus (Typ) then Rewrite (N, - Make_Op_And (Loc, - Left_Opnd => - Make_Op_Shift_Left (Loc, - Left_Opnd => Lop, - Right_Opnd => - Convert_To (Standard_Natural, Right_Opnd (Rop))), - Right_Opnd => + Make_Op_And (Loc, + Left_Opnd => + Make_Op_Shift_Left (Loc, + Left_Opnd => Lop, + Right_Opnd => + Convert_To (Standard_Natural, Right_Opnd (Rop))), + Right_Opnd => Make_Integer_Literal (Loc, Modulus (Typ) - 1))); + else Rewrite (N, Make_Op_Shift_Left (Loc, @@ -8152,14 +8153,15 @@ package body Exp_Ch4 is and then not Non_Binary_Modulus (Typ) then Rewrite (N, - Make_Op_And (Loc, - Left_Opnd => - Make_Op_Shift_Left (Loc, - Left_Opnd => Rop, - Right_Opnd => - Convert_To (Standard_Natural, Right_Opnd (Lop))), - Right_Opnd => - Make_Integer_Literal (Loc, Modulus (Typ) - 1))); + Make_Op_And (Loc, + Left_Opnd => + Make_Op_Shift_Left (Loc, + Left_Opnd => Rop, + Right_Opnd => + Convert_To (Standard_Natural, Right_Opnd (Lop))), + Right_Opnd => + Make_Integer_Literal (Loc, Modulus (Typ) - 1))); + else Rewrite (N, Make_Op_Shift_Left (Loc, diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 92ffa82..a296a8e 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -12004,13 +12004,13 @@ package body Exp_Ch9 is D_Alt : constant Node_Id := Delay_Alternative (N); D_Conv : Node_Id; D_Disc : Node_Id; - D_Stat : Node_Id := Delay_Statement (D_Alt); + D_Stat : Node_Id := Delay_Statement (D_Alt); D_Stats : List_Id; D_Type : Entity_Id; Decls : List_Id; Dummy : Node_Id; E_Alt : constant Node_Id := Entry_Call_Alternative (N); - E_Call : Node_Id := Entry_Call_Statement (E_Alt); + E_Call : Node_Id := Entry_Call_Statement (E_Alt); E_Stats : List_Id; Ename : Node_Id; Formals : List_Id; @@ -12052,9 +12052,9 @@ package body Exp_Ch9 is begin Decl := Make_Subprogram_Body (Loc, - Specification => + Specification => Make_Procedure_Specification (Loc, Defining_Unit_Name => Proc), - Declarations => New_List, + Declarations => New_List, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, E_Stats)); @@ -12087,9 +12087,11 @@ package body Exp_Ch9 is E_Stats := New_List (Make_Procedure_Call_Statement (Loc, - Name => New_Occurrence_Of (Proc, Loc))); + Name => New_Occurrence_Of (Proc, Loc))); end Rewrite_Triggering_Statements; + -- Start of processing for Expand_N_Timed_Entry_Call + begin -- Under the Ravenscar profile, timed entry calls are excluded. An error -- was already reported on spec, so do not attempt to expand the call. @@ -12340,6 +12342,10 @@ package body Exp_Ch9 is -- -- end if; + -- Note: we used to do Copy_Separate_List here, but this was changed + -- to New_Copy_List_Tree with no explanation or RH note??? We should + -- explain the need for the change ??? + N_Stats := New_Copy_List_Tree (E_Stats); Prepend_To (N_Stats, @@ -12380,6 +12386,10 @@ package body Exp_Ch9 is -- ; -- + -- Note: the following was Copy_Separate_List but it was changed to + -- New_Copy_List_Tree without comments or RH documentation ??? We + -- should explain the need for the change ??? + Lim_Typ_Stmts := New_Copy_List_Tree (E_Stats); Prepend_To (Lim_Typ_Stmts, New_Copy_Tree (E_Call)); diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index cd63875..b9c41fa 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -3912,7 +3912,6 @@ package body Sem_Ch12 is if Nkind (Parent (N)) /= N_Compilation_Unit then Mark_Rewrite_Insertion (Act_Decl); Insert_Before (N, Act_Decl); - Analyze (Act_Decl); -- For an instantiation that is a compilation unit, place diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index f07f083..303e2f3 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -6102,13 +6102,18 @@ package body Sem_Ch3 is -- affect anything, but it is still baffling that we cannot use the -- same mechanism for all derived numeric types. - -- There is a further complication: actually *some* representation - -- clauses can affect the implicit base type. Namely, attribute + -- There is a further complication: actually some representation + -- clauses can affect the implicit base type. For example, attribute -- definition clauses for stream-oriented attributes need to set the - -- corresponding TSS entries on the base type, and this normally cannot - -- be done after the base type is frozen, so the circuitry in - -- Sem_Ch13.New_Stream_Subprogram must account for this possibility and - -- not use Set_TSS in this case. + -- corresponding TSS entries on the base type, and this normally + -- cannot be done after the base type is frozen, so the circuitry in + -- Sem_Ch13.New_Stream_Subprogram must account for this possibility + -- and not use Set_TSS in this case. + + -- There are also consequences for the case of delayed representation + -- aspects for some cases. For example, a Size aspect is delayed and + -- should not be evaluated to the freeze point. This early freezing + -- means that the size attribute evaluation happens too early??? if Is_Fixed_Point_Type (Parent_Type) then Conditional_Delay (Implicit_Base, Parent_Type); diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 0d01b71..cb3477b 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -1524,9 +1524,7 @@ package body Sem_Prag is -- subject to aspect/pragma Global. Context := Scope (Subp_Id); - while Present (Context) - and then Context /= Standard_Standard - loop + while Present (Context) and then Context /= Standard_Standard loop if Is_Subprogram (Context) and then Has_Aspect (Context, Aspect_Global) then diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index b27e20b..48b750b 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -7051,11 +7051,10 @@ package Sinfo is -- The pragmas can either come from source or be the byproduct of aspect -- expansion. The ordering in the list is of LIFO fashion. - -- Note that there might be multiple preconditions (resp. - -- postconditions) in this list, either because they come from - -- separate pragmas in the source, or because a Pre (resp. Post) aspect - -- specification has been broken into AND THEN sections. See Split_PPC - -- for details. + -- Note that there might be multiple preconditions or postconditions + -- in this list, either because they come from separate pragmas in the + -- source, or because a Pre (resp. Post) aspect specification has been + -- broken into AND THEN sections. See Split_PPC for details. -- Contract_Test_Cases contains a collection of pragmas that correspond -- to aspects/pragmas Contract_Cases and Test_Case. The ordering in the diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index 82d6ce5..5259dd7 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -2483,8 +2483,8 @@ package body Sprint is -- instantiation node. if Is_Generic_Instance (Defining_Entity (Node)) - and then Has_Aspects ( - Package_Instantiation (Defining_Entity (Node))) + and then Has_Aspects + (Package_Instantiation (Defining_Entity (Node))) then Sprint_Aspect_Specifications (Package_Instantiation (Defining_Entity (Node)), -- cgit v1.1