2005-01-26 Laurent GUERBY <laurent@guerby.net>
authorguerby <guerby@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Jan 2005 21:35:50 +0000 (21:35 +0000)
committerguerby <guerby@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Jan 2005 21:35:50 +0000 (21:35 +0000)
PR ada/19414
* i-cobol.adb (Valid_Numeric): Handle zero length case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94287 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/i-cobol.adb

index 815c8b2..1cf4909 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-26  Laurent GUERBY <laurent@guerby.net>
+
+       PR ada/19414
+       * i-cobol.adb (Valid_Numeric): Handle zero length case.
+       
 2005-01-20  Richard Henderson  <rth@redhat.com>
 
        * Makefile.in (alpha-linux, LIBGNAT_TARGET_PAIRS): Use
index 7dc1f85..38de23d 100644 (file)
@@ -632,6 +632,10 @@ package body Interfaces.COBOL is
       return   Boolean
    is
    begin
+      if Item'Length = 0 then
+         return False;
+      end if;
+
       --  All character positions except first and last must be Digits.
       --  This is true for all the formats.