diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-20 10:55:51 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-20 10:55:51 +0200 |
commit | d7f9440126bb66732dced069c6cc61ea136c1f57 (patch) | |
tree | d3d43f7a558b700ce77e85a82786d8e77509880d | |
parent | f8b86c2d808dadbb9143adacc1b0c162dbf58e1a (diff) | |
download | gcc-d7f9440126bb66732dced069c6cc61ea136c1f57.zip gcc-d7f9440126bb66732dced069c6cc61ea136c1f57.tar.gz gcc-d7f9440126bb66732dced069c6cc61ea136c1f57.tar.bz2 |
[multiple changes]
2009-04-20 Bob Duff <duff@adacore.com>
* rtsfind.adb: Minor comment fix
2009-04-20 Robert Dewar <dewar@adacore.com>
* exp_aggr.adb: Minor reformatting
Minor code reorganization (use Nkind_In)
* g-socket.adb: Minor reformatting
* g-socket.ads: Minor comment fix
* s-auxdec.ads: Minor comment and organization update.
* s-auxdec-vms_64.ads: Minor comment and organization update.
* sem_ch10.adb: Minor addition of ??? comment
* sem_disp.adb: Minor reformatting
From-SVN: r146375
-rw-r--r-- | gcc/ada/ChangeLog | 21 | ||||
-rw-r--r-- | gcc/ada/exp_aggr.adb | 49 | ||||
-rw-r--r-- | gcc/ada/g-socket.adb | 1 | ||||
-rw-r--r-- | gcc/ada/g-socket.ads | 2 | ||||
-rw-r--r-- | gcc/ada/rtsfind.adb | 6 | ||||
-rw-r--r-- | gcc/ada/s-auxdec-vms_64.ads | 12 | ||||
-rw-r--r-- | gcc/ada/s-auxdec.ads | 12 | ||||
-rw-r--r-- | gcc/ada/sem_ch10.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_disp.adb | 15 |
9 files changed, 69 insertions, 51 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 44f54ee..ef790b2 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,24 @@ +2009-04-20 Bob Duff <duff@adacore.com> + + * rtsfind.adb: Minor comment fix + +2009-04-20 Robert Dewar <dewar@adacore.com> + + * exp_aggr.adb: Minor reformatting + Minor code reorganization (use Nkind_In) + + * g-socket.adb: Minor reformatting + + * g-socket.ads: Minor comment fix + + * s-auxdec.ads: Minor comment and organization update. + + * s-auxdec-vms_64.ads: Minor comment and organization update. + + * sem_ch10.adb: Minor addition of ??? comment + + * sem_disp.adb: Minor reformatting + 2009-04-20 Ed Schonberg <schonberg@adacore.com> * inline.adb (Add_Inlined_Subprogram): Do not place on the back-end diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 471a3ae..9200165 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -1069,16 +1069,14 @@ package body Exp_Aggr is -- default initialized components (otherwise Expr_Q is not present). if Present (Expr_Q) - and then (Nkind (Expr_Q) = N_Aggregate - or else Nkind (Expr_Q) = N_Extension_Aggregate) + and then Nkind_In (Expr_Q, N_Aggregate, N_Extension_Aggregate) then - -- At this stage the Expression may not have been - -- analyzed yet because the array aggregate code has not - -- been updated to use the Expansion_Delayed flag and - -- avoid analysis altogether to solve the same problem - -- (see Resolve_Aggr_Expr). So let us do the analysis of - -- non-array aggregates now in order to get the value of - -- Expansion_Delayed flag for the inner aggregate ??? + -- At this stage the Expression may not have been analyzed yet + -- because the array aggregate code has not been updated to use + -- the Expansion_Delayed flag and avoid analysis altogether to + -- solve the same problem (see Resolve_Aggr_Expr). So let us do + -- the analysis of non-array aggregates now in order to get the + -- value of Expansion_Delayed flag for the inner aggregate ??? if Present (Comp_Type) and then not Is_Array_Type (Comp_Type) then Analyze_And_Resolve (Expr_Q, Comp_Type); @@ -2551,10 +2549,8 @@ package body Exp_Aggr is -- of one such. elsif Is_Limited_Type (Etype (A)) - and then (Nkind (Unqualify (A)) = N_Aggregate - or else - Nkind (Unqualify (A)) = N_Extension_Aggregate) - and then Nkind (Unqualify (A)) /= N_Explicit_Dereference + and then Nkind_In (Unqualify (A), N_Aggregate, + N_Extension_Aggregate) then Ancestor_Is_Expression := True; @@ -2589,8 +2585,8 @@ package body Exp_Aggr is -- If the ancestor part is an aggregate, force its full -- expansion, which was delayed. - if Nkind (Unqualify (A)) = N_Aggregate - or else Nkind (Unqualify (A)) = N_Extension_Aggregate + if Nkind_In (Unqualify (A), N_Aggregate, + N_Extension_Aggregate) then Set_Analyzed (A, False); Set_Analyzed (Expression (A), False); @@ -3495,7 +3491,7 @@ package body Exp_Aggr is (Is_Inherently_Limited_Type (Typ) and then (Nkind (Parent (Parent_Node)) = N_Extended_Return_Statement - or else Nkind (Parent_Node) = N_Simple_Return_Statement)) + or else Nkind (Parent_Node) = N_Simple_Return_Statement)) then Set_Expansion_Delayed (N); return; @@ -3691,7 +3687,7 @@ package body Exp_Aggr is if Nkind (Elmt) = N_Aggregate and then Present (Next_Index (Ix)) and then - not Flatten (Elmt, Next_Index (Ix), Next_Index (Ixb)) + not Flatten (Elmt, Next_Index (Ix), Next_Index (Ixb)) then return False; end if; @@ -5022,8 +5018,8 @@ package body Exp_Aggr is else Maybe_In_Place_OK := (Nkind (Parent (N)) = N_Assignment_Statement - and then Comes_From_Source (N) - and then In_Place_Assign_OK) + and then Comes_From_Source (N) + and then In_Place_Assign_OK) or else (Nkind (Parent (Parent (N))) = N_Allocator @@ -5389,8 +5385,8 @@ package body Exp_Aggr is -- an atomic move for it. if Is_Atomic (Typ) - and then (Nkind (Parent (N)) = N_Object_Declaration - or else Nkind (Parent (N)) = N_Assignment_Statement) + and then Nkind_In (Parent (N), N_Object_Declaration, + N_Assignment_Statement) and then Comes_From_Source (Parent (N)) then Expand_Atomic_Aggregate (N, Typ); @@ -5777,8 +5773,7 @@ package body Exp_Aggr is C : Node_Id; Expr : Node_Id; begin - pragma Assert (Nkind (N) = N_Aggregate - or else Nkind (N) = N_Extension_Aggregate); + pragma Assert (Nkind_In (N, N_Aggregate, N_Extension_Aggregate)); if No (Comps) then return False; @@ -5806,8 +5801,8 @@ package body Exp_Aggr is Expr := Expression (C); if Present (Expr) - and then (Nkind (Expr) = N_Aggregate - or else Nkind (Expr) = N_Extension_Aggregate) + and then + Nkind_In (Expr, N_Aggregate, N_Extension_Aggregate) and then Has_Default_Init_Comps (Expr) then return True; @@ -6423,8 +6418,8 @@ package body Exp_Aggr is return False; else - -- The aggregate is static if all components are literals, or - -- else all its components are static aggregates for the + -- The aggregate is static if all components are literals, + -- or else all its components are static aggregates for the -- component type. We also limit the size of a static aggregate -- to prevent runaway static expressions. diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb index 784d062..5ddbd42 100644 --- a/gcc/ada/g-socket.adb +++ b/gcc/ada/g-socket.adb @@ -1690,6 +1690,7 @@ package body GNAT.Sockets is if EAGAIN /= EWOULDBLOCK and then Error_Value = EAGAIN then return Resource_Temporarily_Unavailable; end if; + pragma Warnings (On); case Error_Value is diff --git a/gcc/ada/g-socket.ads b/gcc/ada/g-socket.ads index 882a31a..8de8f02 100644 --- a/gcc/ada/g-socket.ads +++ b/gcc/ada/g-socket.ads @@ -1083,7 +1083,7 @@ package GNAT.Sockets is E_Socket_Set : in out Socket_Set_Type; Status : out Selector_Status; Timeout : Selector_Duration := Forever); - -- This refined version of Check_Selector allows to watch for exception + -- This refined version of Check_Selector allows watching for exception -- events (i.e. notifications of out-of-band transmission and reception). -- As above, all of R_Socket_Set, W_Socket_Set and E_Socket_Set must be -- different objects. diff --git a/gcc/ada/rtsfind.adb b/gcc/ada/rtsfind.adb index 9944bbf..fbe6d45 100644 --- a/gcc/ada/rtsfind.adb +++ b/gcc/ada/rtsfind.adb @@ -720,9 +720,9 @@ package body Rtsfind is -- If the RTS Unit *does* depend on the current unit, for instance, -- when you are compiling System, then you had better have finished - -- analyzing the part of System that is depended on before you try - -- to load the RTS Unit. This means having the System ordered in an - -- appropriate manner. + -- analyzing the part of System that is depended on before you try to + -- load the RTS Unit. This means having the code in System ordered in + -- an appropriate manner. Set_Analyzed (Cunit (Current_Sem_Unit), True); diff --git a/gcc/ada/s-auxdec-vms_64.ads b/gcc/ada/s-auxdec-vms_64.ads index b36341c..3213e18 100644 --- a/gcc/ada/s-auxdec-vms_64.ads +++ b/gcc/ada/s-auxdec-vms_64.ads @@ -63,22 +63,22 @@ package System.Aux_DEC is type Integer_8 is range -2 ** (8 - 1) .. +2 ** (8 - 1) - 1; for Integer_8'Size use 8; - type Integer_8_Array is array (Integer range <>) of Integer_8; - type Integer_16 is range -2 ** (16 - 1) .. +2 ** (16 - 1) - 1; for Integer_16'Size use 16; - type Integer_16_Array is array (Integer range <>) of Integer_16; - type Integer_32 is range -2 ** (32 - 1) .. +2 ** (32 - 1) - 1; for Integer_32'Size use 32; - type Integer_32_Array is array (Integer range <>) of Integer_32; - type Integer_64 is range -2 ** (64 - 1) .. +2 ** (64 - 1) - 1; for Integer_64'Size use 64; + type Integer_8_Array is array (Integer range <>) of Integer_8; + type Integer_16_Array is array (Integer range <>) of Integer_16; + type Integer_32_Array is array (Integer range <>) of Integer_32; type Integer_64_Array is array (Integer range <>) of Integer_64; + -- These array types are not in all versions of DEC System, and in fact it + -- is not quite clear why they are in some and not others, but since they + -- definitely appear in some versions, we include them unconditionally. type Largest_Integer is range Min_Int .. Max_Int; diff --git a/gcc/ada/s-auxdec.ads b/gcc/ada/s-auxdec.ads index 3748bee..4b56baf 100644 --- a/gcc/ada/s-auxdec.ads +++ b/gcc/ada/s-auxdec.ads @@ -53,22 +53,22 @@ package System.Aux_DEC is type Integer_8 is range -2 ** (8 - 1) .. +2 ** (8 - 1) - 1; for Integer_8'Size use 8; - type Integer_8_Array is array (Integer range <>) of Integer_8; - type Integer_16 is range -2 ** (16 - 1) .. +2 ** (16 - 1) - 1; for Integer_16'Size use 16; - type Integer_16_Array is array (Integer range <>) of Integer_16; - type Integer_32 is range -2 ** (32 - 1) .. +2 ** (32 - 1) - 1; for Integer_32'Size use 32; - type Integer_32_Array is array (Integer range <>) of Integer_32; - type Integer_64 is range -2 ** (64 - 1) .. +2 ** (64 - 1) - 1; for Integer_64'Size use 64; + type Integer_8_Array is array (Integer range <>) of Integer_8; + type Integer_16_Array is array (Integer range <>) of Integer_16; + type Integer_32_Array is array (Integer range <>) of Integer_32; type Integer_64_Array is array (Integer range <>) of Integer_64; + -- These array types are not in all versions of DEC System, and in fact it + -- is not quite clear why they are in some and not others, but since they + -- definitely appear in some versions, we include them unconditionally. type Largest_Integer is range Min_Int .. Max_Int; diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index b72c1d2..17f9074 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -774,6 +774,8 @@ package body Sem_Ch10 is Version_Update (N, Lib_Unit); end if; + -- Comment needed here ??? + if Nkind (Defining_Unit_Name (Specification (Unit_Node))) = N_Defining_Program_Unit_Name then diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb index d6799bc..44ec9c3 100644 --- a/gcc/ada/sem_disp.adb +++ b/gcc/ada/sem_disp.adb @@ -739,8 +739,8 @@ package body Sem_Disp is then pragma Assert ((Ekind (Subp) = E_Function - and then Is_Dispatching_Operation (Old_Subp) - and then Is_Null_Extension (Base_Type (Etype (Subp)))) + and then Is_Dispatching_Operation (Old_Subp) + and then Is_Null_Extension (Base_Type (Etype (Subp)))) or else Get_TSS_Name (Subp) = TSS_Stream_Read or else Get_TSS_Name (Subp) = TSS_Stream_Write); @@ -769,12 +769,11 @@ package body Sem_Disp is null; -- If the type is already frozen, the overriding is not allowed - -- except when Old_Subp is not a dispatching operation (which - -- can occur when Old_Subp was inherited by an untagged type). - -- However, a body with no previous spec freezes the type "after" - -- its declaration, and therefore is a legal overriding (unless - -- the type has already been frozen). Only the first such body - -- is legal. + -- except when Old_Subp is not a dispatching operation (which can + -- occur when Old_Subp was inherited by an untagged type). However, + -- a body with no previous spec freezes the type "after" its + -- declaration, and therefore is a legal overriding (unless the type + -- has already been frozen). Only the first such body is legal. elsif Present (Old_Subp) and then Is_Dispatching_Operation (Old_Subp) |