a-ztflau.adb, [...] (Load_Real): Do not parse "." in the case of nnn.xxx when nnn...
authorHristian Kirtchev <kirtchev@adacore.com>
Wed, 6 Jun 2007 10:21:54 +0000 (12:21 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 6 Jun 2007 10:21:54 +0000 (12:21 +0200)
2007-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

* a-ztflau.adb, a-wtflau.adb, a-tiflau.adb (Load_Real): Do not parse
"." in the case of nnn.xxx when nnn terminates with an underscore.
Parse the remaining "#" or ":" in the case of nnn#.xxx#

From-SVN: r125384

gcc/ada/a-tiflau.adb
gcc/ada/a-wtflau.adb
gcc/ada/a-ztflau.adb

index d0fe1e153ee7e1a59ae70e109ce92372fc7faee3..a0a31a8fe153e39ab97c4e1d9873bece462b2fc1 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2007, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -138,6 +138,7 @@ package body Ada.Text_IO.Float_Aux is
 
             if Loaded then
                Load_Extended_Digits (File, Buf, Ptr);
+               Load (File, Buf, Ptr, '#', ':');
 
             --  Case of nnn#xxx.[xxx]# or nnn#xxx#
 
@@ -158,6 +159,13 @@ package body Ada.Text_IO.Float_Aux is
          --  Case of nnn.[nnn] or nnn
 
          else
+            --  Prevent the potential processing of '.' in cases where the
+            --  initial digits have a trailing underscore.
+
+            if Buf (Ptr) = '_' then
+               return;
+            end if;
+
             Load (File, Buf, Ptr, '.', Loaded);
 
             if Loaded then
index a7e03b6bd3f4bdb893bcfbc9d5065f2f3dbf746d..538c7f9ad6c8e4758168a89f6ba4cd47eaca0906 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2007, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -138,6 +138,7 @@ package body Ada.Wide_Text_IO.Float_Aux is
 
             if Loaded then
                Load_Extended_Digits (File, Buf, Ptr);
+               Load (File, Buf, Ptr, '#', ':');
 
             --  Case of nnn#xxx.[xxx]# or nnn#xxx#
 
@@ -158,6 +159,13 @@ package body Ada.Wide_Text_IO.Float_Aux is
          --  Case of nnn.[nnn] or nnn
 
          else
+            --  Prevent the potential processing of '.' in cases where the
+            --  initial digits have a trailing underscore.
+
+            if Buf (Ptr) = '_' then
+               return;
+            end if;
+
             Load (File, Buf, Ptr, '.', Loaded);
 
             if Loaded then
index 11ca1a6b4330e14fad920cbc99826d31b384a912..4ae10b0f2c85acb15b62a48d6702972fd30c9683 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2007, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -138,6 +138,7 @@ package body Ada.Wide_Wide_Text_IO.Float_Aux is
 
             if Loaded then
                Load_Extended_Digits (File, Buf, Ptr);
+               Load (File, Buf, Ptr, '#', ':');
 
             --  Case of nnn#xxx.[xxx]# or nnn#xxx#
 
@@ -158,6 +159,13 @@ package body Ada.Wide_Wide_Text_IO.Float_Aux is
          --  Case of nnn.[nnn] or nnn
 
          else
+            --  Prevent the potential processing of '.' in cases where the
+            --  initial digits have a trailing underscore.
+
+            if Buf (Ptr) = '_' then
+               return;
+            end if;
+
             Load (File, Buf, Ptr, '.', Loaded);
 
             if Loaded then