aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_prag.adb
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2013-10-14 13:06:44 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2013-10-14 15:06:44 +0200
commite443f142047e2a9f67dd859e77d26d94fa3241e8 (patch)
tree67a482fe81e10cfe634ac5d4ee42783847372e6e /gcc/ada/exp_prag.adb
parent5a015f2bbd6ac66c55aceb510c7a8c522f8f6948 (diff)
downloadgcc-e443f142047e2a9f67dd859e77d26d94fa3241e8.zip
gcc-e443f142047e2a9f67dd859e77d26d94fa3241e8.tar.gz
gcc-e443f142047e2a9f67dd859e77d26d94fa3241e8.tar.bz2
cstand.adb (Create_Standard): Change Import_Code component of Standard_Exception_Type to Foreign_Data.
2013-10-14 Tristan Gingold <gingold@adacore.com> * 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
Diffstat (limited to 'gcc/ada/exp_prag.adb')
-rw-r--r--gcc/ada/exp_prag.adb22
1 files changed, 11 insertions, 11 deletions
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;