diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-26 14:47:48 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-26 14:47:48 +0000 |
commit | bd550baffa529087be2a7eb98dd64735da53e52b (patch) | |
tree | 966853aeb51ebcb01d4672b5d9fcb8065248a86d /gcc/ada/gnatcmd.adb | |
parent | fc1e99dbe7d9e443abf618cc1cbf0f3b490cd17f (diff) | |
download | gcc-bd550baffa529087be2a7eb98dd64735da53e52b.tar.gz |
2004-01-26 Ed Schonberg <schonberg@gnat.com>
* exp_ch3.adb (Build_Slice_Assignment): New TSS procedure for
one-dimensional array an slice assignments, when component type is
controlled.
* exp_ch5.adb (Expand_Assign_Array): If array is one-dimensional,
component type is controlled, and control_actions are in effect, use
TSS procedure rather than generating inline code.
* exp_tss.ads (TSS_Slice_Assign): New TSS procedure for one-dimensional
arrays with controlled components.
2004-01-26 Vincent Celier <celier@gnat.com>
* gnatcmd.adb (GNATCmd): Add specification of argument file on the
command line for the non VMS case.
* gnatlink.adb (Process_Binder_File): When building object file, if
GNU linker is used, put all object paths between quotes, to prevent ld
error when there are unusual characters (such as '!') in the paths.
* Makefile.generic: When there are sources in Ada and the main is in
C/C++, invoke gnatmake with -B, instead of -z.
* vms_conv.adb (Preprocess_Command_Data): New procedure, extracted
from VMS_Conversion.
(Process_Argument): New procedure, extracted from VMS_Conversion. Add
specification of argument file on the command line.
2004-01-26 Bernard Banner <banner@gnat.com>
* Makefile.in: Enable GMEM_LIB and SYMLIB for x86_64
2004-01-26 Ed Schonberg <schonberg@gnat.com>
* snames.adb: Update copyright notice.
Add info on slice assignment for controlled arrays.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76634 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatcmd.adb')
-rw-r--r-- | gcc/ada/gnatcmd.adb | 64 |
1 files changed, 60 insertions, 4 deletions
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb index f1896d9da7c..1e04140f10a 100644 --- a/gcc/ada/gnatcmd.adb +++ b/gcc/ada/gnatcmd.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1996-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2004 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- -- @@ -493,10 +493,66 @@ begin end; end; + -- Get the arguments from the command line and from the eventual + -- argument file(s) specified on the command line. + for Arg in Command_Arg + 1 .. Argument_Count loop - Last_Switches.Increment_Last; - Last_Switches.Table (Last_Switches.Last) := - new String'(Argument (Arg)); + declare + The_Arg : constant String := Argument (Arg); + begin + -- Check if an argument file is specified + + if The_Arg (The_Arg'First) = '@' then + declare + Arg_File : Ada.Text_IO.File_Type; + Line : String (1 .. 256); + Last : Natural; + + begin + -- Open the file. Fail if the file cannot be found. + + begin + Open + (Arg_File, In_File, + The_Arg (The_Arg'First + 1 .. The_Arg'Last)); + + exception + when others => + Put + (Standard_Error, "Cannot open argument file """); + Put + (Standard_Error, + The_Arg (The_Arg'First + 1 .. The_Arg'Last)); + + Put_Line (Standard_Error, """"); + raise Error_Exit; + end; + + -- Read line by line and put the content of each + -- non empty line in the Last_Switches table. + + while not End_Of_File (Arg_File) loop + Get_Line (Arg_File, Line, Last); + + if Last /= 0 then + Last_Switches.Increment_Last; + Last_Switches.Table (Last_Switches.Last) := + new String'(Line (1 .. Last)); + end if; + end loop; + + Close (Arg_File); + end; + + else + -- It is not an argument file; just put the argument in + -- the Last_Switches table. + + Last_Switches.Increment_Last; + Last_Switches.Table (Last_Switches.Last) := + new String'(The_Arg); + end if; + end; end loop; end if; end if; |