[multiple changes]

2009-04-16  Jerome Lambourg  <lambourg@adacore.com>

	* sem_prag.adb (Process_Import_Or_Interface): With .NET,
	Access_Subprogram types can also be imported.
	(Check_Form_Of_Interface_Name): Accept '/' character in entity CIL
	names.

2009-04-16  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
	preserve homonym chain when the declaration is rewritten into a
	renaming declaration, in order to preserve visibility structure.

From-SVN: r146169
This commit is contained in:
Arnaud Charlet 2009-04-16 12:52:29 +02:00
parent 54634841e7
commit 7e8ed0a6e4
3 changed files with 22 additions and 6 deletions

View File

@ -1,3 +1,16 @@
2009-04-16 Jerome Lambourg <lambourg@adacore.com>
* sem_prag.adb (Process_Import_Or_Interface): With .NET,
Access_Subprogram types can also be imported.
(Check_Form_Of_Interface_Name): Accept '/' character in entity CIL
names.
2009-04-16 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
preserve homonym chain when the declaration is rewritten into a
renaming declaration, in order to preserve visibility structure.
2009-04-16 Jerome Lambourg <lambourg@adacore.com>
* sem_prag.adb (Analyze_Pragma): Make sure that pragma pack is not

View File

@ -5588,7 +5588,7 @@ package body Exp_Ch6 is
-- in current scope). The Next_Entity links of the two entities also
-- have to be swapped since the entities are part of the return
-- scope's entity list and the list structure would otherwise be
-- corrupted.
-- corrupted. Finally, the homonym chain must be preserved as well.
declare
Renaming_Def_Id : constant Entity_Id :=
@ -5602,6 +5602,7 @@ package body Exp_Ch6 is
Set_Next_Entity (Renaming_Def_Id, Next_Entity (Obj_Def_Id));
Set_Next_Entity (Obj_Def_Id, Next_Entity_Temp);
Set_Homonym (Renaming_Def_Id, Homonym (Obj_Def_Id));
Exchange_Entities (Renaming_Def_Id, Obj_Def_Id);
end;

View File

@ -3531,13 +3531,14 @@ package body Sem_Prag is
end loop;
-- When the convention is Java or CIL, we also allow Import to be
-- given for packages, generic packages, exceptions, and record
-- components.
-- given for packages, generic packages, exceptions, record
-- components, and access to subprograms.
elsif (C = Convention_Java or else C = Convention_CIL)
and then
(Is_Package_Or_Generic_Package (Def_Id)
or else Ekind (Def_Id) = E_Exception
or else Ekind (Def_Id) = E_Access_Subprogram_Type
or else Nkind (Parent (Def_Id)) = N_Component_Declaration)
then
Set_Imported (Def_Id);
@ -3931,16 +3932,17 @@ package body Sem_Prag is
-- For all cases except external names on CLI target,
-- commas, spaces and slashes are dubious (in CLI, we use
-- spaces and commas in external names to specify assembly
-- version and public key).
-- version and public key, while slashes can be used in
-- names to mark nested classes).
or else ((not Ext_Name_Case or else VM_Target /= CLI_Target)
and then (Get_Character (C) = ' '
or else
Get_Character (C) = ','
or else
Get_Character (C) = '/'
or else
Get_Character (C) = '\'))
or else (VM_Target /= CLI_Target
and then Get_Character (C) = '/')
then
Error_Msg
("?interface name contains illegal character",