From e443f142047e2a9f67dd859e77d26d94fa3241e8 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 14 Oct 2013 13:06:44 +0000 Subject: cstand.adb (Create_Standard): Change Import_Code component of Standard_Exception_Type to Foreign_Data. 2013-10-14 Tristan Gingold * cstand.adb (Create_Standard): Change Import_Code component of Standard_Exception_Type to Foreign_Data. Its type is now Standard_A_Char (access to character). * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Adjust definition of Code to match the type of Foreign_Data. * s-stalib.ads (Exception_Data): Replace Import_Code by Foreign_Data Change the definition of standard predefined exceptions. (Exception_Code): Remove. * raise.h (Exception_Code): Remove (Exception_Data): Replace Import_Code field by Foreign_Data. * rtsfind.ads (RE_Exception_Code): Remove (RE_Import_Address): Add. * a-exexpr-gcc.adb (Import_Code_For): Replaced by Foreign_Data_For. * exp_ch11.adb (Expand_N_Exception_Declaration): Associate null to Foreign_Data component. * raise-gcc.c (Import_Code_For): Replaced by Foreign_Data_For. (is_handled_by): Add comments. Use replaced function. Change condition so that an Ada occurrence is never handled by Foreign_Exception. * s-exctab.adb (Internal_Exception): Associate Null_Address to Foreign_Data component. * s-vmexta.adb, s-vmexta.ads (Exception_Code): Declare Replace SSL.Exception_Code by Exception_Code. From-SVN: r203538 --- gcc/ada/exp_prag.adb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'gcc/ada/exp_prag.adb') diff --git a/gcc/ada/exp_prag.adb b/gcc/ada/exp_prag.adb index 3576444..6f425d1 100644 --- a/gcc/ada/exp_prag.adb +++ b/gcc/ada/exp_prag.adb @@ -646,8 +646,9 @@ package body Exp_Prag is -- alias to define the symbol. Code := - Make_Integer_Literal (Loc, - Intval => Exception_Code (Id)); + Unchecked_Convert_To (Standard_A_Char, + Make_Integer_Literal (Loc, + Intval => Exception_Code (Id))); -- Declare a dummy object @@ -655,7 +656,7 @@ package body Exp_Prag is Make_Object_Declaration (Loc, Defining_Identifier => Excep_Internal, Object_Definition => - New_Reference_To (RTE (RE_Exception_Code), Loc)); + New_Reference_To (RTE (RE_Address), Loc)); Insert_Action (N, Excep_Object); Analyze (Excep_Object); @@ -711,13 +712,12 @@ package body Exp_Prag is else Code := - Unchecked_Convert_To (RTE (RE_Exception_Code), - Make_Function_Call (Loc, - Name => - New_Reference_To (RTE (RE_Import_Value), Loc), - Parameter_Associations => New_List - (Make_String_Literal (Loc, - Strval => Excep_Image)))); + Make_Function_Call (Loc, + Name => + New_Reference_To (RTE (RE_Import_Address), Loc), + Parameter_Associations => New_List + (Make_String_Literal (Loc, + Strval => Excep_Image))); end if; -- Generate the call to Register_VMS_Exception @@ -733,7 +733,7 @@ package body Exp_Prag is Prefix => New_Occurrence_Of (Id, Loc), Attribute_Name => Name_Unrestricted_Access))))); - Analyze_And_Resolve (Code, RTE (RE_Exception_Code)); + Analyze_And_Resolve (Code, RTE (RE_Address)); Analyze (Call); end if; -- cgit v1.1