diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-16 12:52:29 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-16 12:52:29 +0200 |
commit | 7e8ed0a6e48698fd6c8eaf189f4b771c6ed2e08b (patch) | |
tree | dcceae89cc6922c98e0c9881ad141f8aac5867fe | |
parent | 54634841e755bf81e1c01d6ad9d4284d2b774709 (diff) | |
download | gcc-7e8ed0a6e48698fd6c8eaf189f4b771c6ed2e08b.zip gcc-7e8ed0a6e48698fd6c8eaf189f4b771c6ed2e08b.tar.gz gcc-7e8ed0a6e48698fd6c8eaf189f4b771c6ed2e08b.tar.bz2 |
[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
-rw-r--r-- | gcc/ada/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/ada/exp_ch6.adb | 3 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 12 |
3 files changed, 22 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b9474b8..b981087 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,18 @@ 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 taken into account for VM targets. diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 2544560..bae10b7 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -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; diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index c3b0f34..cdbd9e3 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -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", |