aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-exexpr-gcc.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-07-16 14:55:50 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-07-16 14:55:50 +0200
commit5df1266a05ba1c1d0a3970a2151f66d9a598b333 (patch)
tree15da4473a32f859d7ef09103804af2ae6a9451ef /gcc/ada/a-exexpr-gcc.adb
parente187fa72fb4806da5b93af1d346446b9fc7f0993 (diff)
downloadgcc-5df1266a05ba1c1d0a3970a2151f66d9a598b333.zip
gcc-5df1266a05ba1c1d0a3970a2151f66d9a598b333.tar.gz
gcc-5df1266a05ba1c1d0a3970a2151f66d9a598b333.tar.bz2
[multiple changes]
2012-07-16 Thomas Quinot <quinot@adacore.com> * freeze.adb (Check_Component_Storage_Order): Do not reject a nested composite with different scalar storage order if it is byte aligned. 2012-07-16 Thomas Quinot <quinot@adacore.com> * gnat_rm.texi: Update documentation for Scalar_Storage_Order. 2012-07-16 Tristan Gingold <gingold@adacore.com> * a-exexpr.adb (Propagate_Exception): Adjust call to Exception_Traces procedures. * a-exexpr-gcc.adb (Setup_Current_Excep): Now a function that returns an access to the Ada occurrence. (Propagate_GCC_Exception): Adjust calls. * raise.h (struct Exception_Occurrence): Declare. * a-exextr.adb: Remove useless pragma. (Notify_Handled_Exception, Notify_Unhandled_Exception) (Unhandled_Exception_Terminate): Add Excep parameter. * a-except.adb (Notify_Handled_Exception, Notify_Unhandled_Exception) (Unhandled_Exception_Terminate): Add Excep parameter. (Process_Raise_Exception): Adjust calls. * a-except-2005.adb (Notify_Handled_Exception, Notify_Unhandled_Exception) (Unhandled_Exception_Terminate): Add Excep parameter. (Raise_Exception): Calls Raise_Exception_Always. * raise-gcc.c (__gnat_setup_current_excep, __gnat_notify_handled_exception) (__gnat_notify_unhandled_exception): Adjust declarations. (PERSONALITY_FUNCTION): Adjust calls. (__gnat_personality_seh0): Remove warning. 2012-07-16 Javier Miranda <miranda@adacore.com> * sem_eval.adb (Test_Expression_Is_Foldable): Adding documentation. (Eval_Relational_Op): Adding documentation. From-SVN: r189532
Diffstat (limited to 'gcc/ada/a-exexpr-gcc.adb')
-rw-r--r--gcc/ada/a-exexpr-gcc.adb22
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/ada/a-exexpr-gcc.adb b/gcc/ada/a-exexpr-gcc.adb
index 10e91bf..e266cb4 100644
--- a/gcc/ada/a-exexpr-gcc.adb
+++ b/gcc/ada/a-exexpr-gcc.adb
@@ -202,8 +202,9 @@ package body Exception_Propagation is
-- Called to implement raise without exception, ie reraise. Called
-- directly from gigi.
- procedure Setup_Current_Excep
- (GCC_Exception : not null GCC_Exception_Access);
+ function Setup_Current_Excep
+ (GCC_Exception : not null GCC_Exception_Access)
+ return EOA;
pragma Export (C, Setup_Current_Excep, "__gnat_setup_current_excep");
-- Write Get_Current_Excep.all from GCC_Exception
@@ -342,8 +343,9 @@ package body Exception_Propagation is
-- Setup_Current_Excep --
-------------------------
- procedure Setup_Current_Excep
+ function Setup_Current_Excep
(GCC_Exception : not null GCC_Exception_Access)
+ return EOA
is
Excep : constant EOA := Get_Current_Excep.all;
@@ -359,6 +361,8 @@ package body Exception_Propagation is
To_GNAT_GCC_Exception (GCC_Exception);
begin
Excep.all := GNAT_Occurrence.Occurrence;
+
+ return GNAT_Occurrence.Occurrence'Access;
end;
else
@@ -370,6 +374,8 @@ package body Exception_Propagation is
Excep.Exception_Raised := True;
Excep.Pid := Local_Partition_ID;
Excep.Num_Tracebacks := 0;
+
+ return Excep;
end if;
end Setup_Current_Excep;
@@ -420,6 +426,7 @@ package body Exception_Propagation is
procedure Propagate_GCC_Exception
(GCC_Exception : not null GCC_Exception_Access)
is
+ Excep : EOA;
begin
-- Perform a standard raise first. If a regular handler is found, it
-- will be entered after all the intermediate cleanups have run. If
@@ -432,8 +439,8 @@ package body Exception_Propagation is
-- the necessary steps to enable the debugger to gain control while the
-- stack is still intact.
- Setup_Current_Excep (GCC_Exception);
- Notify_Unhandled_Exception;
+ Excep := Setup_Current_Excep (GCC_Exception);
+ Notify_Unhandled_Exception (Excep);
-- Now, un a forced unwind to trigger cleanups. Control should not
-- resume there, if there are cleanups and in any cases as the
@@ -466,9 +473,10 @@ package body Exception_Propagation is
procedure Unhandled_Except_Handler
(GCC_Exception : not null GCC_Exception_Access)
is
+ Excep : EOA;
begin
- Setup_Current_Excep (GCC_Exception);
- Unhandled_Exception_Terminate;
+ Excep := Setup_Current_Excep (GCC_Exception);
+ Unhandled_Exception_Terminate (Excep);
end Unhandled_Except_Handler;
-------------