2009-07-13 Thomas Quinot <quinot@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Jul 2009 13:10:51 +0000 (13:10 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Jul 2009 13:10:51 +0000 (13:10 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149583 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/atree.adb
gcc/ada/atree.ads
gcc/ada/impunit.adb
gcc/ada/output.adb
gcc/ada/s-oscons-tmplt.c
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads
gcc/ada/sinfo.adb
gcc/ada/sinfo.ads

index 5321d75..1b00425 100644 (file)
@@ -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.
index 79f2ffd..b227326 100644 (file)
@@ -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 --
    --------
index ae6a1ac..da0b288 100644 (file)
@@ -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
 
index c8d3fd1..4cf3e0c 100644 (file)
@@ -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
index 141c12f..d675dec 100644 (file)
@@ -29,7 +29,9 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
+pragma Warnings (Off);
 with System.OS_Lib; use System.OS_Lib;
+pragma Warnings (On);
 
 package body Output is
 
index 6ec1b1e..b5dd2a8 100644 (file)
@@ -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"
index 2bba103..7a01085 100644 (file)
@@ -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;
 
    -------------------------------------------
index 1d83684..44d6c3e 100644 (file)
@@ -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
index 073c79c..2ed3ad3 100644 (file)
@@ -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 --
    -----------------
index 1e2cd0a..6864813 100644 (file)
@@ -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