diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-07-13 15:10:51 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-07-13 15:10:51 +0200 |
commit | ef76538fbbe91be4c00dd874750e924845d9b289 (patch) | |
tree | 21b7fb988944d375fd24f4c38f8b5ae527a24bca | |
parent | 81c85afed3060fcf54978b01a98a086345c022bd (diff) | |
download | gcc-ef76538fbbe91be4c00dd874750e924845d9b289.zip gcc-ef76538fbbe91be4c00dd874750e924845d9b289.tar.gz gcc-ef76538fbbe91be4c00dd874750e924845d9b289.tar.bz2 |
[multiple changes]
2009-07-13 Thomas Quinot <quinot@adacore.com>
* s-oscons-tmplt.c: Add comment.
2009-07-13 Robert Dewar <dewar@adacore.com>
* sinfo.adb, sinfo.ads, sem_util.adb, atree.adb, atree.ads: Minor
reformatting. Minor code reorganization (add 9 argument version of
Nkind_In).
* impunit.adb: Remove s-os_lib from list of system extensions.
* sem_util.ads: Minor reformatting
* output.adb: Add warnings off/on around System.OS_Lib.
From-SVN: r149583
-rw-r--r-- | gcc/ada/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/ada/atree.adb | 15 | ||||
-rw-r--r-- | gcc/ada/atree.ads | 12 | ||||
-rw-r--r-- | gcc/ada/impunit.adb | 1 | ||||
-rw-r--r-- | gcc/ada/output.adb | 2 | ||||
-rw-r--r-- | gcc/ada/s-oscons-tmplt.c | 9 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 43 | ||||
-rw-r--r-- | gcc/ada/sem_util.ads | 12 | ||||
-rw-r--r-- | gcc/ada/sinfo.adb | 25 | ||||
-rw-r--r-- | gcc/ada/sinfo.ads | 12 |
10 files changed, 116 insertions, 31 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5321d75..1b00425 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,19 @@ +2009-07-13 Thomas Quinot <quinot@adacore.com> + + * s-oscons-tmplt.c: Add comment. + +2009-07-13 Robert Dewar <dewar@adacore.com> + + * sinfo.adb, sinfo.ads, sem_util.adb, atree.adb, atree.ads: Minor + reformatting. Minor code reorganization (add 9 argument version of + Nkind_In). + + * impunit.adb: Remove s-os_lib from list of system extensions. + + * sem_util.ads: Minor reformatting + + * output.adb: Add warnings off/on around System.OS_Lib. + 2009-07-13 Bob Duff <duff@adacore.com> * exp_dist.adb: Minor comment updates. diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb index 79f2ffd..b227326 100644 --- a/gcc/ada/atree.adb +++ b/gcc/ada/atree.adb @@ -1227,6 +1227,21 @@ package body Atree is return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6, V7, V8); end Nkind_In; + function Nkind_In + (N : Node_Id; + V1 : Node_Kind; + V2 : Node_Kind; + V3 : Node_Kind; + V4 : Node_Kind; + V5 : Node_Kind; + V6 : Node_Kind; + V7 : Node_Kind; + V8 : Node_Kind; + V9 : Node_Kind) return Boolean + is + begin + return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6, V7, V8, V9); + end Nkind_In; -------- -- No -- -------- diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads index ae6a1ac..da0b288 100644 --- a/gcc/ada/atree.ads +++ b/gcc/ada/atree.ads @@ -602,6 +602,18 @@ package Atree is V7 : Node_Kind; V8 : Node_Kind) return Boolean; + function Nkind_In + (N : Node_Id; + V1 : Node_Kind; + V2 : Node_Kind; + V3 : Node_Kind; + V4 : Node_Kind; + V5 : Node_Kind; + V6 : Node_Kind; + V7 : Node_Kind; + V8 : Node_Kind; + V9 : Node_Kind) return Boolean; + pragma Inline (Nkind_In); -- Inline all above functions diff --git a/gcc/ada/impunit.adb b/gcc/ada/impunit.adb index c8d3fd1..4cf3e0c 100644 --- a/gcc/ada/impunit.adb +++ b/gcc/ada/impunit.adb @@ -327,7 +327,6 @@ package body Impunit is "s-addima", -- System.Address_Image "s-assert", -- System.Assertions "s-memory", -- System.Memory - "s-os_lib", -- System.Os_Lib "s-parint", -- System.Partition_Interface "s-pooglo", -- System.Pool_Global "s-pooloc", -- System.Pool_Local diff --git a/gcc/ada/output.adb b/gcc/ada/output.adb index 141c12f..d675dec 100644 --- a/gcc/ada/output.adb +++ b/gcc/ada/output.adb @@ -29,7 +29,9 @@ -- -- ------------------------------------------------------------------------------ +pragma Warnings (Off); with System.OS_Lib; use System.OS_Lib; +pragma Warnings (On); package body Output is diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index 6ec1b1e..b5dd2a8 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -76,7 +76,6 @@ pragma Style_Checks ("M32766"); ** $ DEFINE/USER SYS$OUTPUT s-oscons-tmplt.s ** $ RUN s-oscons-tmplt ** $ RUN xoscons - ** **/ #include <stdlib.h> @@ -90,7 +89,13 @@ pragma Style_Checks ("M32766"); #endif #if defined (__vxworks) -#include <vxWorks.h> + +/** + ** For VxWorks, always include vxWorks.h (gsocket.h provides it only for + ** the case of runtime libraries that support sockets). + **/ + +# include <vxWorks.h> #endif #include "gsocket.h" diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 2bba103..7a01085 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -2896,7 +2896,7 @@ package body Sem_Util is -------------------------- procedure Find_Overlaid_Entity - (N : Node_Id; + (N : Node_Id; Ent : out Entity_Id; Off : out Boolean) is @@ -3953,7 +3953,8 @@ package body Sem_Util is elsif Nkind (Expr) = N_Indexed_Component then declare Typ : constant Entity_Id := Etype (Prefix (Expr)); - Ind : constant Node_Id := First_Index (Typ); + Ind : constant Node_Id := First_Index (Typ); + begin -- Bit packed array always generates unknown alignment @@ -3992,8 +3993,8 @@ package body Sem_Util is elsif Known_Alignment (Obj) then declare ObjA : constant Uint := Alignment (Obj); - ExpA : Uint := No_Uint; - SizA : Uint := No_Uint; + ExpA : Uint := No_Uint; + SizA : Uint := No_Uint; begin -- If alignment of Obj is 1, then we are always OK @@ -4071,9 +4072,8 @@ package body Sem_Util is end if; end; - -- If we do not know required alignment, any non-zero offset is - -- a potential problem (but certainly may be OK, so result is - -- unknown). + -- If we do not know required alignment, any non-zero offset is a + -- potential problem (but certainly may be OK, so result is unknown). elsif Offs /= No_Uint then Set_Result (Unknown); @@ -4099,8 +4099,8 @@ package body Sem_Util is if Known_Alignment (Entity (Expr)) and then - UI_To_Int (Alignment (Entity (Expr))) - < Ttypes.Maximum_Alignment + UI_To_Int (Alignment (Entity (Expr))) < + Ttypes.Maximum_Alignment then Set_Result (Unknown); @@ -4113,7 +4113,7 @@ package body Sem_Util is and then (UI_To_Int (Esize (Entity (Expr))) mod (Ttypes.Maximum_Alignment * Ttypes.System_Storage_Unit)) - /= 0 + /= 0 then Set_Result (Unknown); @@ -4130,7 +4130,7 @@ package body Sem_Util is -- Unknown, since that result will be set in any case. elsif Default /= Unknown - and then (Has_Size_Clause (Etype (Expr)) + and then (Has_Size_Clause (Etype (Expr)) or else Has_Alignment_Clause (Etype (Expr))) then @@ -4169,17 +4169,16 @@ package body Sem_Util is ---------------------- function Has_Declarations (N : Node_Id) return Boolean is - K : constant Node_Kind := Nkind (N); - begin - return K = N_Accept_Statement - or else K = N_Block_Statement - or else K = N_Compilation_Unit_Aux - or else K = N_Entry_Body - or else K = N_Package_Body - or else K = N_Protected_Body - or else K = N_Subprogram_Body - or else K = N_Task_Body - or else K = N_Package_Specification; + begin + return Nkind_In (Nkind (N), N_Accept_Statement, + N_Block_Statement, + N_Compilation_Unit_Aux, + N_Entry_Body, + N_Package_Body, + N_Protected_Body, + N_Subprogram_Body, + N_Task_Body, + N_Package_Specification); end Has_Declarations; ------------------------------------------- diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 1d83684..44d6c3e 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -321,15 +321,15 @@ package Sem_Util is -- type denote the discriminant at the same position in this new type. procedure Find_Overlaid_Entity - (N : Node_Id; + (N : Node_Id; Ent : out Entity_Id; Off : out Boolean); - -- The node N should be an address representation clause. Determines if - -- the target expression is the address of an entity with an optional - -- offset. If so, set Ent to the entity and, if there is an offset, set - -- Off to True, otherwise to False. If N is not an address representation + -- The node N should be an address representation clause. Determines if the + -- target expression is the address of an entity with an optional offset. + -- If so, Ent is set to the entity and, if there is an offset, Off is set + -- to True, otherwise to False. If N is not an address representation -- clause, or if it is not possible to determine that the address is of - -- this form, then set Ent to Empty. + -- this form, then Ent is set to Empty, and Off is set to False. function Find_Parameter_Type (Param : Node_Id) return Entity_Id; -- Return the type of formal parameter Param as determined by its diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb index 073c79c..2ed3ad3 100644 --- a/gcc/ada/sinfo.adb +++ b/gcc/ada/sinfo.adb @@ -5822,6 +5822,31 @@ package body Sinfo is T = V8; end Nkind_In; + + function Nkind_In + (T : Node_Kind; + V1 : Node_Kind; + V2 : Node_Kind; + V3 : Node_Kind; + V4 : Node_Kind; + V5 : Node_Kind; + V6 : Node_Kind; + V7 : Node_Kind; + V8 : Node_Kind; + V9 : Node_Kind) return Boolean + is + begin + return T = V1 or else + T = V2 or else + T = V3 or else + T = V4 or else + T = V5 or else + T = V6 or else + T = V7 or else + T = V8 or else + T = V9; + end Nkind_In; + ----------------- -- Pragma_Name -- ----------------- diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 1e2cd0a..6864813 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -9371,6 +9371,18 @@ package Sinfo is V7 : Node_Kind; V8 : Node_Kind) return Boolean; + function Nkind_In + (T : Node_Kind; + V1 : Node_Kind; + V2 : Node_Kind; + V3 : Node_Kind; + V4 : Node_Kind; + V5 : Node_Kind; + V6 : Node_Kind; + V7 : Node_Kind; + V8 : Node_Kind; + V9 : Node_Kind) return Boolean; + pragma Inline (Nkind_In); -- Inline all above functions |