From 81eb625cc8f9f4d0b032c920cd217591fec2e171 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 12 Oct 2010 15:05:11 +0200 Subject: [PATCH] [multiple changes] 2010-10-12 Emmanuel Briot * g-comlin.adb, g-comlin.ads (Define_Switch): Put back (unused) parameter Separator for backward compatibility. 2010-10-12 Robert Dewar * sem_ch9.adb, par-ch9.adb, impunit.adb: Minor reformatting. 2010-10-12 Emmanuel Briot * switch-m.adb: Remove pragma Warnings (Off), not needed. 2010-10-12 Vincent Celier * debug.adb: Put detailed documentation for gnatmake switch -dm. 2010-10-12 Vincent Celier * gnat1drv.adb: When the compiler is invoked for a spec that needs aw body, do not generate an ALI file if neither -gnatc nor -gnatQ is used. From-SVN: r165375 --- gcc/ada/ChangeLog | 22 ++++++++++++++++++---- gcc/ada/debug.adb | 3 ++- gcc/ada/g-comlin.adb | 10 ++++++++-- gcc/ada/g-comlin.ads | 5 +++++ gcc/ada/gnat1drv.adb | 21 ++++++++++++++++++++- gcc/ada/impunit.adb | 2 +- gcc/ada/par-ch9.adb | 1 + gcc/ada/sem_ch9.adb | 11 +++++------ gcc/ada/switch-m.adb | 2 -- 9 files changed, 60 insertions(+), 17 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0e356709c97..016c2083fa1 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,12 +1,26 @@ +2010-10-12 Emmanuel Briot + + * g-comlin.adb, g-comlin.ads (Define_Switch): Put back (unused) + parameter Separator for backward compatibility. + +2010-10-12 Robert Dewar + + * sem_ch9.adb, par-ch9.adb, impunit.adb: Minor reformatting. + +2010-10-12 Vincent Celier + + * debug.adb: Put detailed documentation for gnatmake switch -dm. + +2010-10-12 Vincent Celier + + * gnat1drv.adb: When the compiler is invoked for a spec that needs aw + body, do not generate an ALI file if neither -gnatc nor -gnatQ is used. + 2010-10-12 Arnaud Charlet * g-comlin.adb (Foreach_Switch): Make this procedure generic to avoid using 'Access. -2010-10-12 Emmanuel Briot - - * switch-m.adb: Allow building even in -gnat05 mode. - 2010-10-12 Robert Dewar * debug.adb: Add comment. diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index 102c14daa7b..5bfe7c42271 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -698,7 +698,8 @@ package body Debug is -- df Only output file names, not path names, in log - -- dm Needs documentation ??? + -- dm Issue a message indicating the maximum number of simultaneous + -- compilations. -- dn Do not delete temporary files created by gnatmake at the end -- of execution, such as temporary config pragma files, mapping diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb index 3c2dbce90a3..843dcd7dd32 100644 --- a/gcc/ada/g-comlin.adb +++ b/gcc/ada/g-comlin.adb @@ -1599,7 +1599,8 @@ package body GNAT.Command_Line is Add_Switch (Cmd, Sw, Parameter (Parser)); else Add_Switch - (Cmd, Sw, Parameter (Parser), Section.all); + (Cmd, Sw, Parameter (Parser), + Section => Section.all); end if; end if; end; @@ -2052,13 +2053,15 @@ package body GNAT.Command_Line is (Cmd : in out Command_Line; Switch : String; Parameter : String := ""; + Separator : Character := ' '; Section : String := ""; Add_Before : Boolean := False) is Success : Boolean; pragma Unreferenced (Success); begin - Add_Switch (Cmd, Switch, Parameter, Section, Add_Before, Success); + Add_Switch (Cmd, Switch, Parameter, Separator, + Section, Add_Before, Success); end Add_Switch; ---------------- @@ -2069,10 +2072,13 @@ package body GNAT.Command_Line is (Cmd : in out Command_Line; Switch : String; Parameter : String := ""; + Separator : Character := ' '; Section : String := ""; Add_Before : Boolean := False; Success : out Boolean) is + pragma Unreferenced (Separator); -- ??? Should be removed eventually + procedure Add_Simple_Switch (Simple : String; Separator : String; diff --git a/gcc/ada/g-comlin.ads b/gcc/ada/g-comlin.ads index 668bfd83731..50ae802c1e2 100644 --- a/gcc/ada/g-comlin.ads +++ b/gcc/ada/g-comlin.ads @@ -799,6 +799,7 @@ package GNAT.Command_Line is (Cmd : in out Command_Line; Switch : String; Parameter : String := ""; + Separator : Character := ' '; Section : String := ""; Add_Before : Boolean := False); -- Add a new switch to the command line, and combine/group it with existing @@ -825,6 +826,9 @@ package GNAT.Command_Line is -- added if not already present. For example, to add the -g switch into the -- -cargs section, you need to call (Cmd, "-g", Section => "-cargs"). -- + -- [Separator] is ignored, and kept for backward compatibility only. + -- ??? It might be removed in future versions. + -- -- Invalid_Section is raised if Section was not defined in the -- configuration of the command line. -- @@ -835,6 +839,7 @@ package GNAT.Command_Line is (Cmd : in out Command_Line; Switch : String; Parameter : String := ""; + Separator : Character := ' '; Section : String := ""; Add_Before : Boolean := False; Success : out Boolean); diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 813765b7710..53041cea133 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -863,10 +863,18 @@ begin Write_Str (" (missing subunits)"); Write_Eol; + -- Force generation of ALI file, for backward compatibility + + Opt.Force_ALI_Tree_File := True; + elsif Main_Kind = N_Subunit then Write_Str (" (subunit)"); Write_Eol; + -- Force generation of ALI file, for backward compatibility + + Opt.Force_ALI_Tree_File := True; + elsif Main_Kind = N_Subprogram_Declaration then Write_Str (" (subprogram spec)"); Write_Eol; @@ -877,6 +885,10 @@ begin Write_Str (" (predefined generic)"); Write_Eol; + -- Force generation of ALI file, for backward compatibility + + Opt.Force_ALI_Tree_File := True; + -- Only other case is a package spec else @@ -893,7 +905,14 @@ begin Errout.Output_Messages; Treepr.Tree_Dump; Tree_Gen; - Write_ALI (Object => False); + + -- Generate ALI file if specially requested, or for missing subunits, + -- subunits or predefined generic. + + if Opt.Force_ALI_Tree_File then + Write_ALI (Object => False); + end if; + Namet.Finalize; Check_Rep_Info; diff --git a/gcc/ada/impunit.adb b/gcc/ada/impunit.adb index 766c95003c5..e49d096c1c3 100644 --- a/gcc/ada/impunit.adb +++ b/gcc/ada/impunit.adb @@ -501,7 +501,7 @@ package body Impunit is -- Ada 2012 Units -- -------------------- - -- The following units should be used only in Ada 05 mode + -- The following units should be used only in Ada 2012 mode Non_Imp_File_Names_12 : constant File_List := ( 0 => "s-multip"); -- System.Mutiprocessors diff --git a/gcc/ada/par-ch9.adb b/gcc/ada/par-ch9.adb index 8914a2f9a1d..5c18adf21ca 100644 --- a/gcc/ada/par-ch9.adb +++ b/gcc/ada/par-ch9.adb @@ -810,6 +810,7 @@ package body Ch9 is -- [OVERRIDING_INDICATOR] -- entry DEFINING_IDENTIFIER [(DISCRETE_SUBTYPE_DEFINITION)] -- PARAMETER_PROFILE; + -- [ASPECT_SPECIFICATIONS]; -- The caller has checked that the initial token is ENTRY, NOT or -- OVERRIDING. diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb index 57f522ffce0..e060504d505 100644 --- a/gcc/ada/sem_ch9.adb +++ b/gcc/ada/sem_ch9.adb @@ -194,11 +194,11 @@ package body Sem_Ch9 is return; end if; - -- In order to process the parameters, we create a defining - -- identifier that can be used as the name of the scope. The - -- name of the accept statement itself is not a defining identifier, - -- and we cannot use its name directly because the task may have - -- any number of accept statements for the same entry. + -- In order to process the parameters, we create a defining identifier + -- that can be used as the name of the scope. The name of the accept + -- statement itself is not a defining identifier, and we cannot use + -- its name directly because the task may have any number of accept + -- statements for the same entry. if Present (Index) then Accept_Id := New_Internal_Entity @@ -277,7 +277,6 @@ package body Sem_Ch9 is if Entry_Nam = Scope_Stack.Table (J).Entity then Error_Msg_N ("duplicate accept statement for same entry", N); end if; - end loop; declare diff --git a/gcc/ada/switch-m.adb b/gcc/ada/switch-m.adb index 6a67a0579e5..ab775b53f33 100644 --- a/gcc/ada/switch-m.adb +++ b/gcc/ada/switch-m.adb @@ -31,9 +31,7 @@ with Prj; use Prj; with Prj.Env; use Prj.Env; with Table; -pragma Warnings (Off, "*is an Ada 2012 unit"); with System.Multiprocessors; use System.Multiprocessors; -pragma Warnings (On, "*is an Ada 2012 unit"); package body Switch.M is