===================================================================
@@ -578,8 +578,9 @@
-----------------
procedure Assign_Key (Node : in out Node_Type) is
- New_Item : Element_Type;
- pragma Unmodified (New_Item);
+ pragma Warnings (Off);
+ Default_Initialized_Item : Element_Type;
+ pragma Unmodified (Default_Initialized_Item);
-- Default-initialized element (ok to reference, see below)
begin
@@ -591,7 +592,8 @@
-- default initialization, so insert a possibly initialized element
-- under the given key.
- Node.Element := New_Item;
+ Node.Element := Default_Initialized_Item;
+ pragma Warnings (On);
end Assign_Key;
--------------
===================================================================
@@ -851,8 +851,9 @@
------------
procedure Assign (Node : in out Node_Type) is
- New_Item : Element_Type;
- pragma Unmodified (New_Item);
+ pragma Warnings (Off);
+ Default_Initialized_Item : Element_Type;
+ pragma Unmodified (Default_Initialized_Item);
-- Default-initialized element (ok to reference, see below)
begin
@@ -863,7 +864,8 @@
-- with such a scalar component or with defaulted components, so insert
-- possibly initialized elements at the given position.
- Node.Element := New_Item;
+ Node.Element := Default_Initialized_Item;
+ pragma Warnings (On);
end Assign;
--------------
===================================================================
@@ -1016,9 +1016,13 @@
Count : Count_Type := 1)
is
pragma Warnings (Off);
- New_Item : Element_Type;
+ Default_Initialized_Item : Element_Type;
+ pragma Unmodified (Default_Initialized_Item);
-- OK to reference, see below. Note that we need to suppress both the
- -- front end warning and the back end warning.
+ -- front end warning and the back end warning. In addition, pragma
+ -- Unmodified is needed to suppress the warning ``actual type for
+ -- "Element_Type" should be fully initialized type'' on certain
+ -- instantiations.
begin
-- There is no explicit element provided, but in an instance the element
@@ -1027,7 +1031,7 @@
-- initialization, so insert the specified number of possibly
-- initialized elements at the given position.
- Insert (Container, Before, New_Item, Position, Count);
+ Insert (Container, Before, Default_Initialized_Item, Position, Count);
pragma Warnings (On);
end Insert;
===================================================================
@@ -1581,8 +1581,9 @@
First : Count_Type;
Last : Count_Type;
- New_Item : Element_Type;
- pragma Unmodified (New_Item);
+ pragma Warnings (Off);
+ Default_Initialized_Item : Element_Type;
+ pragma Unmodified (Default_Initialized_Item);
-- OK to reference, see below
begin
@@ -1629,12 +1630,13 @@
-- initialization, so insert the specified number of possibly
-- initialized elements at the given position.
- Allocate_Node (Container, New_Item, First);
+ Allocate_Node (Container, Default_Initialized_Item, First);
Nodes (First).Parent := Parent.Node;
Last := First;
for J in Count_Type'(2) .. Count loop
- Allocate_Node (Container, New_Item, Nodes (Last).Next);
+ Allocate_Node
+ (Container, Default_Initialized_Item, Nodes (Last).Next);
Nodes (Nodes (Last).Next).Parent := Parent.Node;
Nodes (Nodes (Last).Next).Prev := Last;
@@ -1651,6 +1653,7 @@
Container.Count := Container.Count + Count;
Position := Cursor'(Parent.Container, First);
+ pragma Warnings (On);
end Insert_Child;
-------------------------