[Ada] Wrong handling of _ in Big_Reals.From_String
authorArnaud Charlet <charlet@adacore.com>
Mon, 28 Sep 2020 09:52:09 +0000 (05:52 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 24 Nov 2020 10:15:59 +0000 (05:15 -0500)
gcc/ada/

* libgnat/a-nbnbre.adb (From_String): Handle properly '_'
characters.

gcc/ada/libgnat/a-nbnbre.adb

index d61668d1abebc686aa4c03537c2be741d07c526e..055dedc59ad30b5ca468e974a33e88097a0dd028 100644 (file)
@@ -340,7 +340,7 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is
          elsif Arg (J) = '.' then
             Index := J - 1;
             exit;
-         else
+         elsif Arg (J) /= '_' then
             Pow := Pow + 1;
          end if;
       end loop;