aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/switch.ads
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2005-11-15 15:04:56 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-11-15 15:04:56 +0100
commitd4deddd7e92a3b559af36a8f832460ff00cc19fc (patch)
tree91a514cf2a4b28fae991ff1a1824a9d2f353fdc3 /gcc/ada/switch.ads
parent49c041e306a21fdf9d38d8d2b432d3573450693c (diff)
downloadgcc-d4deddd7e92a3b559af36a8f832460ff00cc19fc.zip
gcc-d4deddd7e92a3b559af36a8f832460ff00cc19fc.tar.gz
gcc-d4deddd7e92a3b559af36a8f832460ff00cc19fc.tar.bz2
switch.adb (Bad_Switch): New procedure
2005-11-14 Vincent Celier <celier@adacore.com> * switch.adb (Bad_Switch): New procedure (Scan_Nat, Scan_Pos): Directly call Osint.Fail with the appropriate message when in error. * switch.ads (Bad_Switch, Bad_Switch_Value, Missing_Switch_Value, Too_Many_Output_Files): Remove declarations, no longer used. (Scan_Nat): New parameter Switch (Scan_Pos): Ditto (Bad_Switch): New procedure * switch-b.adb (Scan_Binder_Switches): Replace "raise Bad_Switch;" with call to new procedure Bad_Switch. Call Scan_Pos and Scan_Natwith new parameter Switch. Replace "raise Too_Many_Output_Files;" with call to Osint.Fail. Do not handle any exception. From-SVN: r107011
Diffstat (limited to 'gcc/ada/switch.ads')
-rw-r--r--gcc/ada/switch.ads23
1 files changed, 8 insertions, 15 deletions
diff --git a/gcc/ada/switch.ads b/gcc/ada/switch.ads
index 2be39a3..15c273f 100644
--- a/gcc/ada/switch.ads
+++ b/gcc/ada/switch.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005 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- --
@@ -62,18 +62,6 @@ private
-- child packages (there is one such child package for each tool that
-- uses Switches to scan switches - Compiler/gnatbind/gnatmake/.
- Bad_Switch : exception;
- -- Exception raised if bad switch encountered
-
- Bad_Switch_Value : exception;
- -- Exception raised if bad switch value encountered
-
- Missing_Switch_Value : exception;
- -- Exception raised if no switch value encountered
-
- Too_Many_Output_Files : exception;
- -- Exception raised if the -o switch is encountered more than once
-
Switch_Max_Value : constant := 999_999;
-- Maximum value permitted in switches that take a value
@@ -81,7 +69,8 @@ private
(Switch_Chars : String;
Max : Integer;
Ptr : in out Integer;
- Result : out Nat);
+ Result : out Nat;
+ Switch : Character);
-- Scan natural integer parameter for switch. On entry, Ptr points
-- just past the switch character, on exit it points past the last
-- digit of the integer value.
@@ -90,9 +79,13 @@ private
(Switch_Chars : String;
Max : Integer;
Ptr : in out Integer;
- Result : out Pos);
+ Result : out Pos;
+ Switch : Character);
-- Scan positive integer parameter for switch. On entry, Ptr points
-- just past the switch character, on exit it points past the last
-- digit of the integer value.
+ procedure Bad_Switch (Switch : Character);
+ -- Fail with an appropriate message when a switch is not recognized
+
end Switch;