From b26be063b3ef38c6ddc67e68992a4ecd9c92cd8d Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 17 Jun 2010 09:42:04 +0200 Subject: [multiple changes] 2010-06-17 Ed Schonberg * sem_ch12.adb: propagate Pragma_Enabled flag to generic. * get_scos.adb: Set C2 flag in decision entry of pragma to 'e' (enabled) * par_sco.ads, par_sco.adb (Set_SCO_Pragma_Enabled): New procedure Remove use of Node field in SCOs table (Output_Header): Set 'd' to initially disable pragma entry * put_scos.adb (Put_SCOs): New flag indicating if pragma is enabled * scos.ads, scos.adb: Remove Node field from internal SCOs table. Use C2 field of pragma decision header to indicate enabled. * sem_prag.adb: Add calls to Set_SCO_Pragma_Enabled. * gcc-interface/Make-lang.in: Update dependencies. 2010-06-17 Vincent Celier * back_end.adb (Next_Arg): Moved to procedure Scan_Compiler_Arguments (Scan_Compiler_Arguments): Call Scan_Front_End_Switches with Next_Arg (Switch_Subsequently_Cancelled): Function moved to the body of Switch.C * back_end.ads (Scan_Front_End_Switches): Function moved to the body of Switch.C. * switch-c.adb: Copied a number of global declarations from back_end.adb (Len_Arg): New function copied from back_end.adb (Switch_Subsequently_Cancelled): New function moved from back_end.adb (Scan_Front_End_Switches): New parameter Arg_Rank used to call Switch_Subsequently_Cancelled. * switch-c.ads (Scan_Front_End_Switches): New parameter Arg_Rank. * gcc-interface/Makefile.in: Add line so that shared libgnat is linked with -lexc on Tru64. From-SVN: r160878 --- gcc/ada/back_end.adb | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) (limited to 'gcc/ada/back_end.adb') diff --git a/gcc/ada/back_end.adb b/gcc/ada/back_end.adb index 47836cb..974c4b3 100644 --- a/gcc/ada/back_end.adb +++ b/gcc/ada/back_end.adb @@ -46,10 +46,6 @@ package body Back_End is type Arg_Array_Ptr is access Arg_Array; -- Types to access compiler arguments - Next_Arg : Pos := 1; - -- Next argument to be scanned by Scan_Compiler_Arguments. We make this - -- global so that it can be accessed by Switch_Subsequently_Cancelled. - flag_stack_check : Int; pragma Import (C, flag_stack_check); -- Indicates if stack checking is enabled, imported from toplev.c @@ -166,6 +162,9 @@ package body Back_End is procedure Scan_Compiler_Arguments is + Next_Arg : Pos; + -- Next argument to be scanned + Output_File_Name_Seen : Boolean := False; -- Set to True after having scanned file_name for switch "-gnatO file" @@ -232,6 +231,7 @@ package body Back_End is -- Loop through command line arguments, storing them for later access + Next_Arg := 1; while Next_Arg < save_argc loop Look_At_Arg : declare Argv_Ptr : constant Big_String_Ptr := save_argv (Next_Arg); @@ -284,7 +284,7 @@ package body Back_End is Opt.No_Stdlib := True; elsif Is_Front_End_Switch (Argv) then - Scan_Front_End_Switches (Argv); + Scan_Front_End_Switches (Argv, Next_Arg); -- All non-front-end switches are back-end switches @@ -296,32 +296,4 @@ package body Back_End is Next_Arg := Next_Arg + 1; end loop; end Scan_Compiler_Arguments; - - ----------------------------------- - -- Switch_Subsequently_Cancelled -- - ----------------------------------- - - function Switch_Subsequently_Cancelled (C : String) return Boolean is - Arg : Pos; - - begin - Arg := Next_Arg + 1; - while Arg < save_argc loop - declare - Argv_Ptr : constant Big_String_Ptr := save_argv (Arg); - Argv_Len : constant Nat := Len_Arg (Arg); - Argv : constant String := - Argv_Ptr (1 .. Natural (Argv_Len)); - begin - if Argv = "-gnat-" & C then - return True; - end if; - end; - - Arg := Arg + 1; - end loop; - - return False; - end Switch_Subsequently_Cancelled; - end Back_End; -- cgit v1.1