aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-valuti.ads
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2006-02-15 10:46:41 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2006-02-15 10:46:41 +0100
commitbfe7c10c9b72680d7ecedd5e408499f971097420 (patch)
treecc8ecc6bf75735f2544635ed3a30db37cf84caf2 /gcc/ada/s-valuti.ads
parent744ab5804b6c501e99fa2fd16c580904682ba2f9 (diff)
downloadgcc-bfe7c10c9b72680d7ecedd5e408499f971097420.zip
gcc-bfe7c10c9b72680d7ecedd5e408499f971097420.tar.gz
gcc-bfe7c10c9b72680d7ecedd5e408499f971097420.tar.bz2
s-valint.adb (Scan_Integer): Call Scan_Raw_Unsigned instead of Scan_Unsigned...
2006-02-13 Bob Duff <duff@adacore.com> * s-valint.adb (Scan_Integer): Call Scan_Raw_Unsigned instead of Scan_Unsigned, so we do not scan leading blanks and sign twice. Integer'Value("- 5") and Integer'Value("-+5") now correctly raise Constraint_Error. * s-vallli.adb (Scan_Long_Long_Integer): Call Scan_Raw_Long_Long_Unsigned instead of Scan_Long_Long_Unsigned, so we do not scan leading blanks and sign twice. Integer'Value("- 5") and Integer'Value("-+5") now correctly raise Constraint_Error. * s-valllu.ads, s-valllu.adb (Scan_Raw_Long_Long_Unsigned, Scan_Long_Long_Unsigned): Split out most of the processing from Scan_Long_Long_Unsigned out into Scan_Raw_Long_Long_Unsigned, so that Val_LLI can call the Raw_ version. This prevents scanning leading blanks and sign twice. Also fixed a bug: Modular'Value("-0") should raise Constraint_Error See RM-3.5(44). * s-valuns.ads, s-valuns.adb (Scan_Raw_Unsigned, Scan_Unsigned): Split out most of the processing from Scan_Unsigned out into Scan_Raw_Unsigned, so that Val_LLI can call the Raw_ version. This prevents scanning leading blanks and sign twice. * s-valuti.ads, s-valuti.adb (Scan_Plus_Sign): Add Scan_Plus_Sign, for use with Modular'Value attribute. (Scan_Plus_Sign): Add Scan_Plus_Sign, for use with Modular'Value attribute. From-SVN: r111101
Diffstat (limited to 'gcc/ada/s-valuti.ads')
-rw-r--r--gcc/ada/s-valuti.ads10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/s-valuti.ads b/gcc/ada/s-valuti.ads
index ac90509..944b945 100644
--- a/gcc/ada/s-valuti.ads
+++ b/gcc/ada/s-valuti.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, 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- --
@@ -70,6 +70,14 @@ package System.Val_Util is
-- is greater than Max as required in this case. Constraint_Error is
-- also raised in this case.
+ procedure Scan_Plus_Sign
+ (Str : String;
+ Ptr : access Integer;
+ Max : Integer;
+ Start : out Positive);
+ -- Same as Scan_Sign, but allows only plus, not minus.
+ -- This is used for modular types.
+
function Scan_Exponent
(Str : String;
Ptr : access Integer;