diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-02 14:48:37 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-02 14:48:37 +0200 |
commit | 499769ec33c515c433e407ee25729018457ed295 (patch) | |
tree | c6e6b59ced72e2b75ef882519a53e462c94ac52b /gcc/ada/prepcomp.adb | |
parent | aa1e353a7a34599e90bf9b62b3a463914e242a6c (diff) | |
download | gcc-499769ec33c515c433e407ee25729018457ed295.zip gcc-499769ec33c515c433e407ee25729018457ed295.tar.gz gcc-499769ec33c515c433e407ee25729018457ed295.tar.bz2 |
[multiple changes]
2011-08-02 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
associated with anonymous access to subprograms.
2011-08-02 Geert Bosch <bosch@adacore.com>
* opt.ads
(Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
(Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
* prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
(Add_Symbol_Definition): Move to switch-c.adb
(Process_Command_Line_Symbol_Definitions): Adjust references to above.
* prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
(Add_Symbol_Definition): Move to switch-c.adb.
* sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
* sem_warn.adb
(Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
Move to warnsw.adb.
* sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
Move to warnsw.adb.
* switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
(Add_Symbol_Definition): Moved from Prepcomp.
* switch-c.ads: Update copyright notice. Use String_List instead of
Argument_List, removing dependency on System.OS_Lib.
From-SVN: r177140
Diffstat (limited to 'gcc/ada/prepcomp.adb')
-rw-r--r-- | gcc/ada/prepcomp.adb | 45 |
1 files changed, 2 insertions, 43 deletions
diff --git a/gcc/ada/prepcomp.adb b/gcc/ada/prepcomp.adb index 62f962a..2da21df 100644 --- a/gcc/ada/prepcomp.adb +++ b/gcc/ada/prepcomp.adb @@ -23,8 +23,6 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Unchecked_Deallocation; - with Errout; use Errout; with Lib.Writ; use Lib.Writ; with Opt; use Opt; @@ -55,20 +53,6 @@ package body Prepcomp is No_Mapping : Prep.Symbol_Table.Instance; pragma Warnings (On); - type String_Ptr is access String; - type String_Array is array (Positive range <>) of String_Ptr; - type String_Array_Ptr is access String_Array; - - procedure Free is - new Ada.Unchecked_Deallocation (String_Array, String_Array_Ptr); - - Symbol_Definitions : String_Array_Ptr := new String_Array (1 .. 4); - -- An extensible array to temporarily stores symbol definitions specified - -- on the command line with -gnateD switches. - - Last_Definition : Natural := 0; - -- Index of last symbol definition in array Symbol_Definitions - type Preproc_Data is record Mapping : Symbol_Table.Instance; File_Name : File_Name_Type := No_File; @@ -161,31 +145,6 @@ package body Prepcomp is end loop; end Add_Dependencies; - --------------------------- - -- Add_Symbol_Definition -- - --------------------------- - - procedure Add_Symbol_Definition (Def : String) is - begin - -- If Symbol_Definitions is not large enough, double it - - if Last_Definition = Symbol_Definitions'Last then - declare - New_Symbol_Definitions : constant String_Array_Ptr := - new String_Array (1 .. 2 * Last_Definition); - - begin - New_Symbol_Definitions (Symbol_Definitions'Range) := - Symbol_Definitions.all; - Free (Symbol_Definitions); - Symbol_Definitions := New_Symbol_Definitions; - end; - end if; - - Last_Definition := Last_Definition + 1; - Symbol_Definitions (Last_Definition) := new String'(Def); - end Add_Symbol_Definition; - ------------------- -- Check_Symbols -- ------------------- @@ -740,12 +699,12 @@ package body Prepcomp is -- The command line definitions have been stored temporarily in -- array Symbol_Definitions. - for Index in 1 .. Last_Definition loop + for Index in 1 .. Preprocessing_Symbol_Last loop -- Check each symbol definition, fail immediately if syntax is not -- correct. Check_Command_Line_Symbol_Definition - (Definition => Symbol_Definitions (Index).all, + (Definition => Preprocessing_Symbol_Defs (Index).all, Data => Symbol_Data); Found := False; |