aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/osint-b.adb
diff options
context:
space:
mode:
authorThomas Quinot <quinot@adacore.com>2010-06-22 09:36:25 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-22 11:36:25 +0200
commit125778158bac64ccea58a2156c743fa607545429 (patch)
tree9f819b958fa5cdcdd7d140ae5149fc01169432de /gcc/ada/osint-b.adb
parenta3da92f99d722d52c0117015f26c5c8640b12511 (diff)
downloadgcc-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/osint-b.adb')
-rw-r--r--gcc/ada/osint-b.adb35
1 files changed, 32 insertions, 3 deletions
diff --git a/gcc/ada/osint-b.adb b/gcc/ada/osint-b.adb
index b66cebf..a3062f4 100644
--- a/gcc/ada/osint-b.adb
+++ b/gcc/ada/osint-b.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2010, 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- --
@@ -24,10 +24,13 @@
------------------------------------------------------------------------------
with Opt; use Opt;
+with Output; use Output;
with Targparm; use Targparm;
package body Osint.B is
+ Current_List_File : File_Descriptor := Invalid_FD;
+
-------------------------
-- Close_Binder_Output --
-------------------------
@@ -45,6 +48,19 @@ package body Osint.B is
end Close_Binder_Output;
+ ---------------------
+ -- Close_List_File --
+ ---------------------
+
+ procedure Close_List_File is
+ begin
+ if Current_List_File /= Invalid_FD then
+ Close (Current_List_File);
+ Current_List_File := Invalid_FD;
+ Set_Standard_Output;
+ end if;
+ end Close_List_File;
+
--------------------------
-- Create_Binder_Output --
--------------------------
@@ -65,8 +81,8 @@ package body Osint.B is
begin
if Output_File_Name /= "" then
- Name_Buffer (Output_File_Name'Range) := Output_File_Name;
- Name_Buffer (Output_File_Name'Last + 1) := ASCII.NUL;
+ Name_Buffer (1 .. Output_File_Name'Length) := Output_File_Name;
+ Name_Buffer (Output_File_Name'Length + 1) := ASCII.NUL;
if Typ = 's' then
Name_Buffer (Output_File_Name'Last) := 's';
@@ -176,6 +192,19 @@ package body Osint.B is
Current_File_Name_Index := To;
end Set_Current_File_Name_Index;
+ procedure Set_List_File (Filename : String) is
+ begin
+ pragma Assert (Current_List_File = Invalid_FD);
+ Current_List_File := Create_File (Filename, Text);
+
+ if Current_List_File = Invalid_FD then
+ Fail ("cannot create list file: " & Filename);
+
+ else
+ Set_Output (Current_List_File);
+ end if;
+ end Set_List_File;
+
-----------------------
-- Write_Binder_Info --
-----------------------