]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Apr 2009 08:55:51 +0000 (10:55 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Apr 2009 08:55:51 +0000 (10:55 +0200)
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

gcc/ada/ChangeLog
gcc/ada/exp_aggr.adb
gcc/ada/g-socket.adb
gcc/ada/g-socket.ads
gcc/ada/rtsfind.adb
gcc/ada/s-auxdec-vms_64.ads
gcc/ada/s-auxdec.ads
gcc/ada/sem_ch10.adb
gcc/ada/sem_disp.adb

index 44f54ee4d21902d44653e35fde8b2bebdba1553d..ef790b22cf7ab9d67c379b4e795f80a9e074586a 100644 (file)
@@ -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
index 471a3ae503de16185a86b8a4e4cd9158a7d85012..9200165b844d8fb28f671f7b0d60aa8f7e00b23b 100644 (file)
@@ -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.
 
index 784d0626bad5dc989f042cd2c12696f172641f06..5ddbd42f737c7b6348cf81a53f2df1bffa30b7fd 100644 (file)
@@ -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
index 882a31a82310993cdb554400c1c8c7cc4a65f5db..8de8f02fe7eb2e870f0b7c248ec2a815b8417271 100644 (file)
@@ -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.
index 9944bbf713b6bae5d27ec2aade3953a68e59add2..fbe6d4547efd27e32a463cdf5c29735bf231ef34 100644 (file)
@@ -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);
 
index b36341c0163df3636ce687601b1d38e240130383..3213e18a6427194f61cb3ff0766442ffc676c2d8 100644 (file)
@@ -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;
 
index 3748beec2310b1ab82c2b7dfca0619ed836ac92f..4b56bafffc4fd90fa83266df907729d79fddffa1 100644 (file)
@@ -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;
 
index b72c1d291cb04f84630b29c457137629a5314254..17f907492ee93c6769d5e0bdbcc378fc90db0921 100644 (file)
@@ -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
index d6799bce4f5a73920824d58d251bcb9a3898ef34..44ec9c332538191a79edd6acb08e3d1e4232b036 100644 (file)
@@ -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)