diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-10 14:52:46 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-10 14:52:46 +0000 |
commit | e5e512c52ff19986ad4ace0092b97d1a05b87566 (patch) | |
tree | 895f82359759face41b9b601b7972775c577719e | |
parent | da94c58fb5137a243c00798d1bec1a2842679440 (diff) | |
download | gcc-e5e512c52ff19986ad4ace0092b97d1a05b87566.tar.gz |
2013-09-10 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb,
exp_ch4.adb, sprint.adb: Minor reformatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202455 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/einfo.ads | 1 | ||||
-rw-r--r-- | gcc/ada/exp_ch4.adb | 32 | ||||
-rw-r--r-- | gcc/ada/exp_ch9.adb | 20 | ||||
-rw-r--r-- | gcc/ada/sem_ch12.adb | 1 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 17 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sinfo.ads | 9 | ||||
-rw-r--r-- | gcc/ada/sprint.adb | 4 |
9 files changed, 56 insertions, 37 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3c9757d6930..51352d1100d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2013-09-10 Robert Dewar <dewar@adacore.com> + + * 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 <moy@adacore.com> * sinfo.ads: Document splitting of pre/post in N_Contract description. diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 24bb12cf797..69a0d7e64a5 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 ffb49cb80cb..0802f2dfa51 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 92ffa821710..a296a8e8578 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 -- <timed-statements> -- 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 -- <dispatching-call>; -- <triggering-statements> + -- 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 cd638756c91..b9c41fa4dc8 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 f07f083463a..303e2f30132 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 0d01b7170ab..cb3477bcbe9 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 b27e20b04ae..48b750be8b1 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 82d6ce59cca..5259dd776ff 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)), |