gcc/ada/
* libgnat/a-cbsyqu.ads (Implementation): Provide a box
initialization for the element array used internally to
represent the queue, so that its components are properly
initialized if the given element type has default
initialization. Suppress warnings on the rest of the package in
case the element type has no default or discriminant, because it
is bound to be confusing to the user.
-- Need proper heap data structure here ???
+ -- We suppress warnings here, which might otherwise be triggered
+ -- by the box initialization of the Elements array below. This
+ -- initialization is needed to preserve constraints, such as
+ -- discriminant values, that the actual for Element_Type might
+ -- carry.
+
+ pragma Warnings (Off);
+
type Element_Array is
array (Count_Type range <>) of Queue_Interfaces.Element_Type;
First, Last : Count_Type := 0;
Length : Count_Type := 0;
Max_Length : Count_Type := 0;
- Elements : Element_Array (1 .. Capacity);
+ Elements : Element_Array (1 .. Capacity) := (others => <>);
end record;
end Implementation;