From 17c5c8a5ee243fd9b68af7beeb9351a4ee215b9b Mon Sep 17 00:00:00 2001 From: Geert Bosch Date: Thu, 20 Dec 2001 07:22:43 +0100 Subject: bindgen.adb: Minor reformatting * bindgen.adb: Minor reformatting * cstand.adb: Minor reformatting * fmap.adb: Minor reformatting Change name from Add for Add_To_File_Map (Add is much too generic) Change Path_Name_Of to Mapped_Path_Name Change File_Name_Of to Mapped_File_Name Fix copyright dates in header * fmap.ads: Change name from Add for Add_To_File_Map (Add is much too generic) Change Path_Name_Of to Mapped_Path_Name Change File_Name_Of to Mapped_File_Name Fix copyright dates in header * fname-uf.adb: Minor reformatting. New names of stuff in Fmap. Add use clause for Fmap. * make.adb: Minor reformatting * osint.adb: Minor reformatting. Change of names in Fmap. Add use clause for Fmap. * prj-env.adb: Minor reformatting * prj-env.ads: Minor reformatting * switch.adb: Minor reformatting. Do proper raise of Bad_Switch if error found (there were odd exceptions to this general rule in -gnatec/-gnatem processing) * raise.c (__gnat_eh_personality): Exception handling personality routine for Ada. Still in rough state, inspired from the C++ version and still containing a bunch of debugging artifacts. (parse_lsda_header, get_ttype_entry): Local (static) helpers, also inspired from the C++ library. * raise.c (eh_personality): Add comments. Part of work for the GCC 3 exception handling integration. * Makefile.in: Remove use of 5smastop.adb which is obsolete. (HIE_SOURCES): Add s-secsta.ad{s,b}. (HIE_OBJS): Add s-fat*.o (RAVEN_SOURCES): Remove files that are no longer required. Add interrupt handling files. (RAVEN_MOD): Removed, no longer needed. * a-ngelfu.adb: Remove ??? comment for inappropriate Inline_Always Add 2001 to copyright date * g-regpat.adb: Change pragma Inline_Always to Inline. There is no need to force universal inlining for these cases. * s-taprob.adb: Minor clean ups so that this unit can be used in Ravenscar HI. * exp_ch7.adb: Allow use of secondary stack in HI mode. Disallow it when pragma Restrictions (No_Secondary_Stack) is specified. * prj-tree.ads (Project_Node_Record): Add comments for components Pkg_Id and Case_Insensitive. * g-socket.adb: Minor reformatting. Found while reading code. * prj-tree.ads: Minor reformatting From-SVN: r48195 --- gcc/ada/switch.adb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gcc/ada/switch.adb') diff --git a/gcc/ada/switch.adb b/gcc/ada/switch.adb index 36ada8c..53ed7ae 100644 --- a/gcc/ada/switch.adb +++ b/gcc/ada/switch.adb @@ -610,8 +610,9 @@ package body Switch is when 'c' => Ptr := Ptr + 1; + if Ptr > Max then - Osint.Fail ("Invalid switch: ", "ec"); + raise Bad_Switch; end if; Config_File_Name := @@ -623,18 +624,17 @@ package body Switch is when 'm' => Ptr := Ptr + 1; + if Ptr > Max then - Osint.Fail ("Invalid switch: ", "em"); + raise Bad_Switch; end if; Mapping_File_Name := new String'(Switch_Chars (Ptr .. Max)); - return; when others => - Osint.Fail ("Invalid switch: ", - (1 => 'e', 2 => Switch_Chars (Ptr))); + raise Bad_Switch; end case; -- Processing for E switch -- cgit v1.1