From cc335f4371177761ce88a58a7d5e710f202635fb Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 14 Jun 2004 15:19:14 +0200 Subject: [multiple changes] 2004-06-14 Pascal Obry * gnat_ugn.texi: Document relocatable vs. dynamic Library_Kind on Windows. Fix minor typo. * mlib-tgt-mingw.adb: New implementation using the GCC -shared option which is now supported on Windows. With this implementation using the Library Project feature is no different on Windows than on UNIX. 2004-06-14 Vincent Celier * makegpr.adb (Compile_Sources): Nothing to do when there are no non-Ada sources. * mlib-tgt-vxworks.adb (Library_Exists_For): Remove incorrect comment * prj-part.adb (Parse_Single_Project): When a duplicate project name is found, show the project name and the path of the previously parsed project file. 2004-06-14 Ed Schonberg * exp_ch6.adb (Add_Call_By_Copy_Code): For an out-parameter that is an array, avoid copying the actual before the call. 2004-06-14 Thomas Quinot * g-debpoo.adb: Remove alignment assumptions from GNAT.Debug_Pools. Instead, allocate memory on worst-case alignment assumptions, and then return an aligned address within the allocated zone. 2004-06-14 Robert Dewar * bindgen.adb (Gen_Adainit_Ada): Do not generate external references to elab entities in predefined units in No_Run_Time_Mode. (Gen_Adainit_C): Same fix (Gen_Elab_Calls_Ada): Do not generate calls to elaborate predefined units in No_Run_Time_Mode (Gen_Elab_Calls_C): Same fix * symbols-vms-alpha.adb: Minor reformatting * g-debpoo.ads: Minor reformatting * lib.adb (In_Same_Extended_Unit): Version working on node id's * lib.ads (In_Same_Extended_Unit): Version working on node id's * lib-xref.adb: Minor cleanup, use new version of In_Same_Extended_Unit working on nodes. * make.adb: Minor reformatting * par-ch12.adb: Minor reformatting * par-prag.adb: Add dummy entry for pragma Profile_Warnings * prj-strt.adb: Minor reformatting * restrict.ads, restrict.adb: Redo handling of profile restrictions to be more general. * sem_attr.adb: Minor reformatting * sem_ch7.adb: Minor reformatting * sem_elab.adb (Check_A_Call): Deal with problem of calling init proc for type in the same unit as the object declaration. * sem_prag.adb (Check_Arg_Is_External_Name): New procedure, allows static string expressions and not just string literals. Minor reformatting (Set_Warning): Reset restriction warning flag for restriction pragma Implement pragma Profile_Warnings Implement pragma Profile (Restricted) Give obolescent messages for old restrictions and pragmas * snames.h, snames.ads, snames.adb: Add new entry for pragma Profile_Warnings. * s-rident.ads: Add declarations for restrictions required by profile Restricted and profile Ravenscar. * targparm.ads, targparm.adb: Allow pragma Profile in system.ads * gnat_ugn.texi: Correct some missing entries in the list of GNAT configuration pragmas. From-SVN: r83099 --- gcc/ada/sem_elab.adb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gcc/ada/sem_elab.adb') diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb index 78b5663..4248544 100644 --- a/gcc/ada/sem_elab.adb +++ b/gcc/ada/sem_elab.adb @@ -359,7 +359,7 @@ package body Sem_Elab is return; end if; - -- Nothing to do for imported entities, + -- Nothing to do for imported entities if Is_Imported (Ent) then return; @@ -426,8 +426,8 @@ package body Sem_Elab is -- If the generic entity is within a deeper instance than we are, then -- either the instantiation to which we refer itself caused an ABE, in - -- which case that will be handled separately. Otherwise, we know that - -- the body we need appears as needed at the point of the instantiation. + -- which case that will be handled separately, or else we know that the + -- body we need appears as needed at the point of the instantiation. -- However, this assumption is only valid if we are in static mode. if not Dynamic_Elaboration_Checks @@ -638,11 +638,13 @@ package body Sem_Elab is -- Find top level scope for called entity (not following renamings -- or derivations). This is where the Elaborate_All will go if it -- is needed. We start with the called entity, except in the case - -- of initialization procedures, where the init proc is in the root - -- package, where we start fromn the entity of the name in the call. + -- of an initialization procedure outside the current package, where + -- the init proc is in the root package, and we start from the entity + -- of the name in the call. if Is_Entity_Name (Name (N)) and then Is_Init_Proc (Entity (Name (N))) + and then not In_Same_Extended_Unit (N, Entity (Name (N))) then W_Scope := Scope (Entity (Name (N))); else @@ -810,7 +812,7 @@ package body Sem_Elab is -- current declarative part if not Same_Elaboration_Scope (Current_Scope, Scope (Ent)) - or else not In_Same_Extended_Unit (Sloc (N), Sloc (Ent)) + or else not In_Same_Extended_Unit (N, Ent) then return; end if; -- cgit v1.1