diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-18 11:53:50 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-18 11:53:50 +0000 |
commit | 24ded5c146bddd8b5847df85a951e757197b8a3e (patch) | |
tree | 1fbf797869f8f3471eef48a8e964e6aba1139657 /gcc/ada/switch-m.adb | |
parent | 648873e7f1c2f52b0cb3e4fbf29f698390c41e6a (diff) | |
download | gcc-24ded5c146bddd8b5847df85a951e757197b8a3e.tar.gz |
2005-03-17 Vincent Celier <celier@adacore.com>
* switch-m.adb (Normalize_Compiler_Switches): Recognize switches
-gnat83, -gnat95 and -gnat05.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96677 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/switch-m.adb')
-rw-r--r-- | gcc/ada/switch-m.adb | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/gcc/ada/switch-m.adb b/gcc/ada/switch-m.adb index 5215fe15029..aeb33e7cfb4 100644 --- a/gcc/ada/switch-m.adb +++ b/gcc/ada/switch-m.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2004 Free Software Foundation, Inc. -- +-- Copyright (C) 2001-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- -- @@ -404,6 +404,50 @@ package body Switch.M is end if; end loop; + -- -gnat95 -gnat05 + + when '0' | '9' => + Last_Stored := First_Stored; + Storing (Last_Stored) := C; + Ptr := Ptr + 1; + + if Ptr /= Max or else Switch_Chars (Ptr) /= '5' then + + -- Invalid switch + + Last := 0; + return; + + else + Last_Stored := Last_Stored + 1; + Storing (Last_Stored) := '5'; + Add_Switch_Component + (Storing (Storing'First .. Last_Stored)); + Ptr := Ptr + 1; + end if; + + -- -gnat83 + + when '8' => + Last_Stored := First_Stored; + Storing (Last_Stored) := '8'; + Ptr := Ptr + 1; + + if Ptr /= Max or else Switch_Chars (Ptr) /= '3' then + + -- Invalid switch + + Last := 0; + return; + + else + Last_Stored := Last_Stored + 1; + Storing (Last_Stored) := '3'; + Add_Switch_Component + (Storing (Storing'First .. Last_Stored)); + Ptr := Ptr + 1; + end if; + -- Not a valid switch when others => |