diff options
author | Thomas Quinot <quinot@adacore.com> | 2010-06-22 09:36:25 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-22 11:36:25 +0200 |
commit | 125778158bac64ccea58a2156c743fa607545429 (patch) | |
tree | 9f819b958fa5cdcdd7d140ae5149fc01169432de /gcc/ada/switch-b.adb | |
parent | a3da92f99d722d52c0117015f26c5c8640b12511 (diff) | |
download | gcc-125778158bac64ccea58a2156c743fa607545429.zip gcc-125778158bac64ccea58a2156c743fa607545429.tar.gz gcc-125778158bac64ccea58a2156c743fa607545429.tar.bz2 |
sem_res.adb (Make_Call_Into_Operator): Use First_Subtype for better error reporting with generic types.
2010-06-22 Thomas Quinot <quinot@adacore.com>
* sem_res.adb (Make_Call_Into_Operator): Use First_Subtype for better
error reporting with generic types.
2010-06-22 Thomas Quinot <quinot@adacore.com>
* bindgen.adb, bindusg.adb, gnatbind.adb, gnat_ugn.texi, opt.ads,
osint-b.adb, osint-b.ads, output.adb, output.ads, switch-b.adb,
vms_data.ads: Add a new command line switch -A to gnatbind to output
the list of all ALI files for the partition.
From-SVN: r161153
Diffstat (limited to 'gcc/ada/switch-b.adb')
-rw-r--r-- | gcc/ada/switch-b.adb | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/gcc/ada/switch-b.adb b/gcc/ada/switch-b.adb index e0b6ab7..32140c9 100644 --- a/gcc/ada/switch-b.adb +++ b/gcc/ada/switch-b.adb @@ -41,10 +41,35 @@ package body Switch.B is Ptr : Integer := Switch_Chars'First; C : Character := ' '; + function Get_Optional_Filename return String_Ptr; + -- If current character is '=', return a newly allocated string + -- containing the remainder of the current switch (after the '='), else + -- return null. + function Get_Stack_Size (S : Character) return Int; -- Used for -d and -D to scan stack size including handling k/m. -- S is set to 'd' or 'D' to indicate the switch being scanned. + --------------------------- + -- Get_Optional_Filename -- + --------------------------- + + function Get_Optional_Filename return String_Ptr is + Result : String_Ptr; + begin + if Ptr <= Max and then Switch_Chars (Ptr) = '=' then + if Ptr = Max then + Bad_Switch (Switch_Chars); + else + Result := new String'(Switch_Chars (Ptr + 1 .. Max)); + Ptr := Max + 1; + return Result; + end if; + else + return null; + end if; + end Get_Optional_Filename; + -------------------- -- Get_Stack_Size -- -------------------- @@ -125,7 +150,8 @@ package body Switch.B is when 'A' => Ptr := Ptr + 1; - Ada_Bind_File := True; + Output_ALI_List := True; + ALI_List_Filename := Get_Optional_Filename; -- Processing for b switch @@ -144,7 +170,6 @@ package body Switch.B is when 'C' => Ptr := Ptr + 1; - Ada_Bind_File := False; Write_Line ("warning: gnatbind switch -C is obsolescent"); @@ -318,6 +343,7 @@ package body Switch.B is when 'O' => Ptr := Ptr + 1; Output_Object_List := True; + Object_List_Filename := Get_Optional_Filename; -- Processing for p switch |