diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-03 14:45:56 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-03 14:45:56 +0000 |
commit | b58dc77d798498577244710b5a12fec3588b1bb4 (patch) | |
tree | 2d32960fb664e091bc9b840b4f4cdbdfb1bc9b8b /gcc/ada/bindgen.adb | |
parent | f693d591d209aa6a249e0de50ea530b592fd5213 (diff) | |
download | gcc-b58dc77d798498577244710b5a12fec3588b1bb4.tar.gz |
2011-08-03 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
modified in the source, to prevent spurious warnings when compiling
with -gnatg.
2011-08-03 Thomas Quinot <quinot@adacore.com>
* a-except-2005.adb: Minor reformatting.
2011-08-03 Ed Schonberg <schonberg@adacore.com>
* sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
is a renaming declaration in the private part of a package, do not emit
a warning that the with_clause could be moved because the renaming may
be used in the body or in a child unit.
2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
Propagate the Comes_From_Source attribute from the original return
object to the renaming.
2011-08-03 Jose Ruiz <ruiz@adacore.com>
* exp_ch7.adb (Build_Raise_Statement): Do not call
Raise_From_Controlled_Operation when this routine is not present in
the run-time library.
(Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
libraries (Ravenscar), tasks are non-terminating, and protected objects
and tasks can only appear at library level, so we do not want
finalization of protected objects nor tasks.
* exp_intr.adb: Minor clarification in comment.
bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
Gen_Output_File_C): Remove references to finalization of library-level
objects when using restricted run-time libraries.
2011-08-03 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Discriminant_Constraints): Set
Original_Discriminant only if the parent type is a generic formal.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177278 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r-- | gcc/ada/bindgen.adb | 64 |
1 files changed, 39 insertions, 25 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index eeec4708bc0..2d9a1c1e85e 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -665,10 +665,11 @@ package body Bindgen is """__gnat_handler_installed"");"); -- The import of the soft link which performs library-level object - -- finalization is not needed for VM targets. Regular Ada is used in - -- that case. + -- finalization is not needed for VM targets; regular Ada is used in + -- that case. For restricted run-time libraries (ZFP and Ravenscar) + -- tasks are non-terminating, so we do not want finalization. - if VM_Target = No_VM then + if VM_Target = No_VM and then not Configurable_Run_Time_On_Target then WBI (""); WBI (" type No_Param_Proc is access procedure;"); WBI (" Finalize_Library_Objects : No_Param_Proc;"); @@ -926,32 +927,38 @@ package body Bindgen is WBI (" Initialize_Stack_Limit;"); end if; - -- Attach Finalize_Library to the right softlink + -- Attach Finalize_Library to the right soft link. Do it only when not + -- using a restricted run time, in which case tasks are + -- non-terminating, so we do not want library-level finalization. - if not Suppress_Standard_Library_On_Target then - WBI (""); + if not Configurable_Run_Time_On_Target then + if not Suppress_Standard_Library_On_Target then + WBI (""); - if VM_Target = No_VM then - if Lib_Final_Built then - Set_String (" Finalize_Library_Objects := "); - Set_String ("Finalize_Library'access;"); - else - Set_String (" Finalize_Library_Objects := null;"); - end if; + if VM_Target = No_VM then + if Lib_Final_Built then + Set_String (" Finalize_Library_Objects := "); + Set_String ("Finalize_Library'access;"); + else + Set_String (" Finalize_Library_Objects := null;"); + end if; - -- On VM targets use regular Ada to set the soft link + -- On VM targets use regular Ada to set the soft link - else - if Lib_Final_Built then - Set_String (" System.Soft_Links.Finalize_Library_Objects"); - Set_String (" := Finalize_Library'access;"); else - Set_String (" System.Soft_Links.Finalize_Library_Objects"); - Set_String (" := null;"); + if Lib_Final_Built then + Set_String + (" System.Soft_Links.Finalize_Library_Objects"); + Set_String (" := Finalize_Library'access;"); + else + Set_String + (" System.Soft_Links.Finalize_Library_Objects"); + Set_String (" := null;"); + end if; end if; - end if; - Write_Statement_Buffer; + Write_Statement_Buffer; + end if; end if; -- Generate elaboration calls @@ -2117,7 +2124,10 @@ package body Bindgen is ---------------- procedure Gen_Main_C is - Needs_Library_Finalization : constant Boolean := Has_Finalizer; + Needs_Library_Finalization : constant Boolean := + not Configurable_Run_Time_On_Target and then Has_Finalizer; + -- For restricted run-time libraries (ZFP and Ravenscar) tasks are + -- non-terminating, so we do not want library-level finalization. begin if Exit_Status_Supported_On_Target then @@ -2638,7 +2648,10 @@ package body Bindgen is -- Name to be used for generated Ada main program. See the body of -- function Get_Ada_Main_Name for details on the form of the name. - Needs_Library_Finalization : constant Boolean := Has_Finalizer; + Needs_Library_Finalization : constant Boolean := + not Configurable_Run_Time_On_Target and then Has_Finalizer; + -- For restricted run-time libraries (ZFP and Ravenscar) tasks are + -- non-terminating, so we do not want finalization. Bfiles : Name_Id; -- Name of generated bind file (spec) @@ -2990,7 +3003,8 @@ package body Bindgen is procedure Gen_Output_File_C (Filename : String) is - Needs_Library_Finalization : constant Boolean := Has_Finalizer; + Needs_Library_Finalization : constant Boolean := + not Configurable_Run_Time_On_Target and then Has_Finalizer; Bfile : Name_Id; pragma Warnings (Off, Bfile); |