[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 27 Sep 2011 09:37:53 +0000 (11:37 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 27 Sep 2011 09:37:53 +0000 (11:37 +0200)
2011-09-27  Pascal Obry  <obry@adacore.com>

* s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
OS_Interface.pthread_rwlock_t.

2011-09-27  Robert Dewar  <dewar@adacore.com>

* exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
sem_ch5.adb, sem_util.adb: Minor reformatting.

From-SVN: r179252

13 files changed:
gcc/ada/ChangeLog
gcc/ada/a-cbmutr.adb
gcc/ada/a-cbmutr.ads
gcc/ada/a-cimutr.adb
gcc/ada/a-cimutr.ads
gcc/ada/a-comutr.adb
gcc/ada/a-comutr.ads
gcc/ada/exp_ch9.adb
gcc/ada/exp_dist.adb
gcc/ada/gnat1drv.adb
gcc/ada/s-taspri-posix-noaltstack.ads
gcc/ada/sem_ch5.adb
gcc/ada/sem_util.adb

index e084f06ecb655708ffad7f9cb3e437d5d66c9ef8..a5213ebdea835fc1e7f18d9770635064d7365126 100644 (file)
@@ -1,3 +1,14 @@
+2011-09-27  Pascal Obry  <obry@adacore.com>
+
+       * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
+       OS_Interface.pthread_rwlock_t.
+
+2011-09-27  Robert Dewar  <dewar@adacore.com>
+
+       * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
+       a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
+       sem_ch5.adb, sem_util.adb: Minor reformatting.
+
 2011-09-27  Pascal Obry  <obry@adacore.com>
 
        * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
index 32ab0828942442a35bb952b315df742a4b913f92..8e6c148e914ae8eb5281445656927e4ccc2ab92e 100644 (file)
@@ -1737,19 +1737,14 @@ package body Ada.Containers.Bounded_Multiway_Trees is
      return Tree_Iterator_Interfaces.Forward_Iterator'Class
    is
       Root_Cursor : constant Cursor :=
-        (Container'Unrestricted_Access, Root_Node (Container));
+                      (Container'Unrestricted_Access, Root_Node (Container));
    begin
       return
         Iterator'(Container'Unrestricted_Access,
-                     First_Child (Root_Cursor), From_Root => True);
+                  First_Child (Root_Cursor),
+                  From_Root => True);
    end Iterate;
 
-   function Iterate_Subtree (Position : Cursor)
-     return Tree_Iterator_Interfaces.Forward_Iterator'Class is
-   begin
-      return Iterator'(Position.Container, Position, From_Root => False);
-   end Iterate_Subtree;
-
    ----------------------
    -- Iterate_Children --
    ----------------------
@@ -1818,6 +1813,14 @@ package body Ada.Containers.Bounded_Multiway_Trees is
    -- Iterate_Subtree --
    ---------------------
 
+   function Iterate_Subtree
+     (Position : Cursor)
+      return Tree_Iterator_Interfaces.Forward_Iterator'Class
+   is
+   begin
+      return Iterator'(Position.Container, Position, From_Root => False);
+   end Iterate_Subtree;
+
    procedure Iterate_Subtree
      (Position  : Cursor;
       Process   : not null access procedure (Position : Cursor))
@@ -1841,7 +1844,6 @@ package body Ada.Containers.Bounded_Multiway_Trees is
 
          if Is_Root (Position) then
             Iterate_Children (T, Position.Node, Process);
-
          else
             Iterate_Subtree (T, Position.Node, Process);
          end if;
@@ -1938,7 +1940,7 @@ package body Ada.Containers.Bounded_Multiway_Trees is
    begin
       if Is_Leaf (Position) then
 
-         --  If sibling is present, return it.
+         --  If sibling is present, return it
 
          if N.Next /= 0 then
             return (Object.Container, N.Next);
@@ -1955,7 +1957,7 @@ package body Ada.Containers.Bounded_Multiway_Trees is
                while Par.Next = 0 loop
                   Pos := Par.Parent;
 
-                  --  If we are back at the root the iteration is complete.
+                  --  If we are back at the root the iteration is complete
 
                   if Pos = No_Node then
                      return No_Element;
@@ -1983,10 +1985,9 @@ package body Ada.Containers.Bounded_Multiway_Trees is
             end;
          end if;
 
-      else
-
-         --  If an internal node, return its first child.
+      --  If an internal node, return its first child
 
+      else
          return (Object.Container, N.Children.First);
       end if;
    end Next;
@@ -2351,24 +2352,22 @@ package body Ada.Containers.Bounded_Multiway_Trees is
      (Container : aliased Tree;
       Position  : Cursor) return Constant_Reference_Type
    is
-   begin
       pragma Unreferenced (Container);
-
+   begin
       return
         (Element =>
-            Position.Container.Elements (Position.Node)'Unchecked_Access);
+           Position.Container.Elements (Position.Node)'Unchecked_Access);
    end Constant_Reference;
 
    function Reference
      (Container : aliased Tree;
       Position  : Cursor) return Reference_Type
    is
-   begin
       pragma Unreferenced (Container);
-
+   begin
       return
         (Element =>
-            Position.Container.Elements (Position.Node)'Unchecked_Access);
+           Position.Container.Elements (Position.Node)'Unchecked_Access);
    end Reference;
 
    --------------------
index f20af0487c507214df450fa68270dcf582c190f5..6d6c6f3f4dec60db10d3c6f8e2850172df2da0fc 100644 (file)
@@ -377,13 +377,11 @@ private
 
    function Constant_Reference
      (Container : aliased Tree;
-      Position  : Cursor)
-   return Constant_Reference_Type;
+      Position  : Cursor) return Constant_Reference_Type;
 
    function Reference
      (Container : aliased Tree;
-      Position  : Cursor)
-    return Reference_Type;
+      Position  : Cursor) return Reference_Type;
 
    Empty_Tree : constant Tree := (Capacity => 0, others => <>);
 
index 96c1fe26d7a7762286a19962107a24d01fb9ce73..6b9d7b6b2f12397b78713421d124ec82e3bfcb32 100644 (file)
@@ -1305,19 +1305,14 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
      return Tree_Iterator_Interfaces.Forward_Iterator'Class
    is
       Root_Cursor : constant Cursor :=
-        (Container'Unrestricted_Access, Root_Node (Container));
+                      (Container'Unrestricted_Access, Root_Node (Container));
    begin
       return
         Iterator'(Container'Unrestricted_Access,
-                     First_Child (Root_Cursor), From_Root => True);
+                  First_Child (Root_Cursor),
+                  From_Root => True);
    end Iterate;
 
-   function Iterate_Subtree (Position : Cursor)
-     return Tree_Iterator_Interfaces.Forward_Iterator'Class is
-   begin
-      return Iterator'(Position.Container, Position, From_Root => False);
-   end Iterate_Subtree;
-
    ----------------------
    -- Iterate_Children --
    ----------------------
@@ -1378,6 +1373,14 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
    -- Iterate_Subtree --
    ---------------------
 
+   function Iterate_Subtree
+     (Position : Cursor)
+      return Tree_Iterator_Interfaces.Forward_Iterator'Class
+   is
+   begin
+      return Iterator'(Position.Container, Position, From_Root => False);
+   end Iterate_Subtree;
+
    procedure Iterate_Subtree
      (Position  : Cursor;
       Process   : not null access procedure (Position : Cursor))
@@ -1498,7 +1501,7 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
    begin
       if Is_Leaf (Position) then
 
-         --  If sibling is present, return it.
+         --  If sibling is present, return it
 
          if N.Next /= null then
             return (Object.Container, N.Next);
@@ -1513,7 +1516,7 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
             begin
                while Par.Next = null loop
 
-                  --  If we are back at the root the iteration is complete.
+                  --  If we are back at the root the iteration is complete
 
                   if Par = Root_Node (T)  then
                      return No_Element;
@@ -1541,10 +1544,9 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
             end;
          end if;
 
-      else
-
-         --  If an internal node, return its first child.
+      --  If an internal node, return its first child
 
+      else
          return (Object.Container, N.Children.First);
       end if;
    end Next;
index c47f986c9b3710b4a35fa70894b021e867b07c27..141ced0e47abba72bd29ed0859a836c90737c9f0 100644 (file)
@@ -397,13 +397,11 @@ private
 
    function Constant_Reference
      (Container : aliased Tree;
-      Position  : Cursor)
-   return Constant_Reference_Type;
+      Position  : Cursor) return Constant_Reference_Type;
 
    function Reference
      (Container : aliased Tree;
-      Position  : Cursor)
-    return Reference_Type;
+      Position  : Cursor) return Reference_Type;
 
    Empty_Tree : constant Tree := (Controlled with others => <>);
 
index 17b70d4dc1ba08d4b99cbc2ef98b0bea2308601d..e3e25573e53d7c0a01811c514938ba4cc88c806a 100644 (file)
@@ -1348,19 +1348,14 @@ package body Ada.Containers.Multiway_Trees is
      return Tree_Iterator_Interfaces.Forward_Iterator'Class
    is
       Root_Cursor : constant Cursor :=
-        (Container'Unrestricted_Access, Root_Node (Container));
+                      (Container'Unrestricted_Access, Root_Node (Container));
    begin
       return
         Iterator'(Container'Unrestricted_Access,
-                     First_Child (Root_Cursor), From_Root => True);
+                  First_Child (Root_Cursor),
+                  From_Root => True);
    end Iterate;
 
-   function Iterate_Subtree (Position : Cursor)
-     return Tree_Iterator_Interfaces.Forward_Iterator'Class is
-   begin
-      return Iterator'(Position.Container, Position, From_Root => False);
-   end Iterate_Subtree;
-
    ----------------------
    -- Iterate_Children --
    ----------------------
@@ -1421,6 +1416,14 @@ package body Ada.Containers.Multiway_Trees is
    -- Iterate_Subtree --
    ---------------------
 
+   function Iterate_Subtree
+     (Position : Cursor)
+      return Tree_Iterator_Interfaces.Forward_Iterator'Class
+   is
+   begin
+      return Iterator'(Position.Container, Position, From_Root => False);
+   end Iterate_Subtree;
+
    procedure Iterate_Subtree
      (Position  : Cursor;
       Process   : not null access procedure (Position : Cursor))
@@ -1438,7 +1441,6 @@ package body Ada.Containers.Multiway_Trees is
 
          if Is_Root (Position) then
             Iterate_Children (Position.Container, Position.Node, Process);
-
          else
             Iterate_Subtree (Position.Container, Position.Node, Process);
          end if;
index 00a78e3aebb5faa834f4007bda19a0bbab577455..02a286d3410e9dc75ab60bf7a8ff4bed23e9e12b 100644 (file)
@@ -442,13 +442,11 @@ private
 
    function Constant_Reference
      (Container : aliased Tree;
-      Position  : Cursor)
-   return Constant_Reference_Type;
+      Position  : Cursor) return Constant_Reference_Type;
 
    function Reference
      (Container : aliased Tree;
-      Position  : Cursor)
-    return Reference_Type;
+      Position  : Cursor) return Reference_Type;
 
    Empty_Tree : constant Tree := (Controlled with others => <>);
 
index b8bcfaedc316cfbdf9c8481433dd3aa48d186522..c3c97ad9e527ad3bb9517eb7ceea322d9a5b39c6 100644 (file)
@@ -1690,7 +1690,7 @@ package body Exp_Ch9 is
       --  The parameter that designates the synchronized object in the call
 
       Actuals : constant List_Id := New_List;
-      --  the actuals in the entry call
+      --  The actuals in the entry call
 
       Decls : constant List_Id := New_List;
 
@@ -8337,7 +8337,7 @@ package body Exp_Ch9 is
             Insert_After (Current_Node, Sub);
             Analyze (Sub);
 
-            --  build wrapper procedure for pre/postconditions
+            --  Build wrapper procedure for pre/postconditions
 
             Build_PPC_Wrapper (Comp_Id, N);
 
@@ -10618,28 +10618,31 @@ package body Exp_Ch9 is
       if Present (Taskdef)
         and then Has_Storage_Size_Pragma (Taskdef)
         and then
-          Is_Static_Expression (Expression (First (
-            Pragma_Argument_Associations (Find_Task_Or_Protected_Pragma (
-              Taskdef, Name_Storage_Size)))))
+          Is_Static_Expression
+            (Expression
+               (First (Pragma_Argument_Associations
+                         (Find_Task_Or_Protected_Pragma
+                            (Taskdef, Name_Storage_Size)))))
       then
          Size_Decl :=
            Make_Object_Declaration (Loc,
              Defining_Identifier => Storage_Size_Variable (Tasktyp),
-             Object_Definition => New_Reference_To (RTE (RE_Size_Type), Loc),
-             Expression =>
+             Object_Definition   => New_Reference_To (RTE (RE_Size_Type), Loc),
+             Expression          =>
                Convert_To (RTE (RE_Size_Type),
-                 Relocate_Node (
-                   Expression (First (
-                     Pragma_Argument_Associations (
-                       Find_Task_Or_Protected_Pragma
-                         (Taskdef, Name_Storage_Size)))))));
+                 Relocate_Node
+                   (Expression (First (Pragma_Argument_Associations
+                                         (Find_Task_Or_Protected_Pragma
+                                            (Taskdef, Name_Storage_Size)))))));
 
       else
          Size_Decl :=
            Make_Object_Declaration (Loc,
              Defining_Identifier => Storage_Size_Variable (Tasktyp),
-             Object_Definition => New_Reference_To (RTE (RE_Size_Type), Loc),
-             Expression => New_Reference_To (RTE (RE_Unspecified_Size), Loc));
+             Object_Definition   =>
+               New_Reference_To (RTE (RE_Size_Type), Loc),
+             Expression          =>
+               New_Reference_To (RTE (RE_Unspecified_Size), Loc));
       end if;
 
       Insert_After (Elab_Decl, Size_Decl);
@@ -10652,7 +10655,7 @@ package body Exp_Ch9 is
 
       Append_To (Cdecls,
         Make_Component_Declaration (Loc,
-          Defining_Identifier =>
+          Defining_Identifier  =>
             Make_Defining_Identifier (Loc, Name_uTask_Id),
           Component_Definition =>
             Make_Component_Definition (Loc,
@@ -10673,8 +10676,8 @@ package body Exp_Ch9 is
                Make_Component_Definition (Loc,
                  Aliased_Present     => True,
                  Subtype_Indication  => Make_Subtype_Indication (Loc,
-                   Subtype_Mark => New_Occurrence_Of
-                     (RTE (RE_Ada_Task_Control_Block), Loc),
+                   Subtype_Mark =>
+                     New_Occurrence_Of (RTE (RE_Ada_Task_Control_Block), Loc),
 
                    Constraint   =>
                      Make_Index_Or_Discriminant_Constraint (Loc,
index f857d0e82c4a7dfca4102d3d07de5a6d8bb32b62..4a59b2a634342c47e529fc7b3f9214a10732ed9a 100644 (file)
@@ -11075,7 +11075,6 @@ package body Exp_Dist is
 
       function RPC_Receiver_Decl (RACW_Type : Entity_Id) return Node_Id is
          Loc : constant Source_Ptr := Sloc (RACW_Type);
-
       begin
          return
            Make_Object_Declaration (Loc,
index 8a8c8050cd5040fe6154bfb54b699cfe38226597..bf811eb5fb5bb2396a0e81dd267feb17d2b2baf1 100644 (file)
@@ -474,10 +474,12 @@ procedure Gnat1drv is
          Warning_Mode := Suppress;
 
          --  Suppress the generation of name tables for enumerations
+         --  why???
 
          Global_Discard_Names := True;
 
          --  Suppress the expansion of tagged types and dispatching calls
+         --  why???
 
          Tagged_Type_Expansion := False;
       end if;
index 22c2b7bf502c67f9a0f318e0c074f3f1c41c77e1..8958cbee02fb65f5dcb05fa832c798e0d3d51936 100644 (file)
@@ -80,7 +80,7 @@ package System.Task_Primitives is
 private
 
    type Lock is new System.OS_Interface.pthread_mutex_t;
-   type RW_Lock is new Lock;
+   type RW_Lock is new System.OS_Interface.pthread_rwlock_t;
    type RTS_Lock is new System.OS_Interface.pthread_mutex_t;
 
    type Suspension_Object is record
index fdd4b1fbc6703af09235f9c9ae310f4b71b618a6..875eb1c077802be9c29889d7939ab081597598f9 100644 (file)
@@ -2302,8 +2302,9 @@ package body Sem_Ch5 is
       Typ : Entity_Id;
 
    begin
-      --  In semantics and Alfa modes, introduce loop variable so that loop
-      --  body can be properly analyzed. Otherwise this is one after expansion.
+      --  In semantics/Alfa modes, we won't be further expanding the loop, so
+      --  introduce loop variable so that loop body can be properly analyzed.
+      --  Otherwise this happens after expansion.
 
       if Operating_Mode = Check_Semantics
         or else Alfa_Mode
index 26d90af4dd6ebb78cf72b3a8bafe2671892811c0..5df84dcf7d7f541e59a1d95e76ccc151f18e0b95 100644 (file)
@@ -2274,9 +2274,9 @@ package body Sem_Util is
    is
       Comp  : Node_Id;
       Comps : constant List_Id := New_List;
+
    begin
       Comp := First_Component (Underlying_Type (R_Typ));
-
       while Present (Comp) loop
          if Comes_From_Source (Comp) then
             declare
@@ -2291,6 +2291,7 @@ package body Sem_Util is
                        (Component_Definition (Comp_Decl), New_Sloc => Loc)));
             end;
          end if;
+
          Next_Component (Comp);
       end loop;