gcc/ada/
* libgnat/s-valrea.adb (Integer_to_Real): Use a subtype of Num
for the component type of the table of powers of ten.
* libgnat/s-valuer.adb (Round_Extra): Add assertion on Base.
when 10 =>
declare
- Powten : constant array (0 .. Maxpow) of Num;
+ subtype Pow_Num is Num range 1.0 .. Num'Last;
+
+ Powten : constant array (0 .. Maxpow) of Pow_Num;
pragma Import (Ada, Powten);
for Powten'Address use Powten_Address;
Extra : in out Char_As_Digit;
Base : Unsigned)
is
+ pragma Assert (Base in 2 .. 16);
+
B : constant Uns := Uns (Base);
begin