summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-27 09:37:53 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-27 09:37:53 +0000
commitf52e508dca0d6bb1f0ba72882961142469942566 (patch)
tree37169ca0c07156d926d1fe1e342b29d21ab6db1c
parentc5bd783914e5754e51e35348838500f5e85f30c7 (diff)
downloadgcc-f52e508dca0d6bb1f0ba72882961142469942566.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179252 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog11
-rw-r--r--gcc/ada/a-cbmutr.adb39
-rw-r--r--gcc/ada/a-cbmutr.ads6
-rw-r--r--gcc/ada/a-cimutr.adb28
-rw-r--r--gcc/ada/a-cimutr.ads6
-rw-r--r--gcc/ada/a-comutr.adb20
-rw-r--r--gcc/ada/a-comutr.ads6
-rw-r--r--gcc/ada/exp_ch9.adb37
-rw-r--r--gcc/ada/exp_dist.adb1
-rw-r--r--gcc/ada/gnat1drv.adb2
-rw-r--r--gcc/ada/s-taspri-posix-noaltstack.ads2
-rw-r--r--gcc/ada/sem_ch5.adb5
-rw-r--r--gcc/ada/sem_util.adb3
13 files changed, 90 insertions, 76 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index e084f06ecb6..a5213ebdea8 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,16 @@
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.
(Finalize_Lock)[RW_Lock]: Likewise.
(Write_Lock)[RW_Lock]: Likewise.
diff --git a/gcc/ada/a-cbmutr.adb b/gcc/ada/a-cbmutr.adb
index 32ab0828942..8e6c148e914 100644
--- a/gcc/ada/a-cbmutr.adb
+++ b/gcc/ada/a-cbmutr.adb
@@ -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;
--------------------
diff --git a/gcc/ada/a-cbmutr.ads b/gcc/ada/a-cbmutr.ads
index f20af0487c5..6d6c6f3f4de 100644
--- a/gcc/ada/a-cbmutr.ads
+++ b/gcc/ada/a-cbmutr.ads
@@ -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 => <>);
diff --git a/gcc/ada/a-cimutr.adb b/gcc/ada/a-cimutr.adb
index 96c1fe26d7a..6b9d7b6b2f1 100644
--- a/gcc/ada/a-cimutr.adb
+++ b/gcc/ada/a-cimutr.adb
@@ -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;
diff --git a/gcc/ada/a-cimutr.ads b/gcc/ada/a-cimutr.ads
index c47f986c9b3..141ced0e47a 100644
--- a/gcc/ada/a-cimutr.ads
+++ b/gcc/ada/a-cimutr.ads
@@ -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 => <>);
diff --git a/gcc/ada/a-comutr.adb b/gcc/ada/a-comutr.adb
index 17b70d4dc1b..e3e25573e53 100644
--- a/gcc/ada/a-comutr.adb
+++ b/gcc/ada/a-comutr.adb
@@ -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;
diff --git a/gcc/ada/a-comutr.ads b/gcc/ada/a-comutr.ads
index 00a78e3aebb..02a286d3410 100644
--- a/gcc/ada/a-comutr.ads
+++ b/gcc/ada/a-comutr.ads
@@ -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 => <>);
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index b8bcfaedc31..c3c97ad9e52 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -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,
diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb
index f857d0e82c4..4a59b2a6343 100644
--- a/gcc/ada/exp_dist.adb
+++ b/gcc/ada/exp_dist.adb
@@ -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,
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index 8a8c8050cd5..bf811eb5fb5 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -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;
diff --git a/gcc/ada/s-taspri-posix-noaltstack.ads b/gcc/ada/s-taspri-posix-noaltstack.ads
index 22c2b7bf502..8958cbee02f 100644
--- a/gcc/ada/s-taspri-posix-noaltstack.ads
+++ b/gcc/ada/s-taspri-posix-noaltstack.ads
@@ -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
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index fdd4b1fbc67..875eb1c0778 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -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
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 26d90af4dd6..5df84dcf7d7 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -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;