GNAT implements a format with trailing '*' signs for the Image attribute
of NaN, +inf and -inf. It was probably always intended to be the same
length as the image of 1.0, but one '*' was actually missing. This patch
fixes this.
gcc/ada/ChangeLog:
* libgnat/s-imager.adb (Image_Floating_Point): Tweak display of
invalid floating point values.
is
pragma Assert (S'First = 1);
+ Fore : Natural;
begin
-- Decide whether a blank should be prepended before the call to
-- Set_Image_Real. We generate a blank for positive values, and
-- Image_Floating_Point operation.
S (1) := ' ';
P := 1;
+ Fore := 1;
else
P := 0;
+ Fore := 2;
end if;
- Set_Image_Real (V, S, P, 1, Digs - 1, 3);
+ Set_Image_Real (V, S, P, Fore, Digs - 1, 3);
end Image_Floating_Point;
-----------------