aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/i-cobol.adb4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 815c8b2..1cf4909 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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
diff --git a/gcc/ada/i-cobol.adb b/gcc/ada/i-cobol.adb
index 7dc1f85..38de23d 100644
--- a/gcc/ada/i-cobol.adb
+++ b/gcc/ada/i-cobol.adb
@@ -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.