aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/raise-gcc.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-29 12:20:48 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-29 12:20:48 +0200
commit92db5dee00b7dfdba5f8a66c67e5ce64843b5897 (patch)
tree21a115072de0d1c3445d45d632a0dc0b6e84e9f7 /gcc/ada/raise-gcc.c
parent1378bf105ea73f1d4fab574dc8ed6d1479433296 (diff)
downloadgcc-92db5dee00b7dfdba5f8a66c67e5ce64843b5897.zip
gcc-92db5dee00b7dfdba5f8a66c67e5ce64843b5897.tar.gz
gcc-92db5dee00b7dfdba5f8a66c67e5ce64843b5897.tar.bz2
[multiple changes]
2011-08-29 Tristan Gingold <gingold@adacore.com> * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants. (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component. (Adjust_N_CLeanups_For): Remove. (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of stack is reached. (Propgate_Exception): Adjust. * raise-gcc.c: Add a few static/const. (Adjust_N_Cleanups_For): Remove declaration. (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger. 2011-08-29 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb: Use type of function return when rewriting as object declaration. From-SVN: r178188
Diffstat (limited to 'gcc/ada/raise-gcc.c')
-rw-r--r--gcc/ada/raise-gcc.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c
index 3a88727..fb0ec81 100644
--- a/gcc/ada/raise-gcc.c
+++ b/gcc/ada/raise-gcc.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2010, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2011, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -128,7 +128,7 @@ typedef struct
char * description;
} phase_descriptor;
-static phase_descriptor phase_descriptors[]
+static const phase_descriptor phase_descriptors[]
= {{ _UA_SEARCH_PHASE, "SEARCH_PHASE" },
{ _UA_CLEANUP_PHASE, "CLEANUP_PHASE" },
{ _UA_HANDLER_FRAME, "HANDLER_FRAME" },
@@ -622,7 +622,7 @@ typedef enum
} action_kind;
/* filter value for cleanup actions. */
-const int cleanup_filter = 0;
+static const int cleanup_filter = 0;
typedef struct
{
@@ -842,7 +842,6 @@ get_call_site_action_for (_Unwind_Context *uw_context,
#define Language_For __gnat_language_for
#define Import_Code_For __gnat_import_code_for
#define EID_For __gnat_eid_for
-#define Adjust_N_Cleanups_For __gnat_adjust_n_cleanups_for
extern bool Is_Handled_By_Others (_Unwind_Ptr eid);
extern char Language_For (_Unwind_Ptr eid);
@@ -850,7 +849,6 @@ extern char Language_For (_Unwind_Ptr eid);
extern Exception_Code Import_Code_For (_Unwind_Ptr eid);
extern Exception_Id EID_For (_GNAT_Exception * e);
-extern void Adjust_N_Cleanups_For (_GNAT_Exception * e, int n);
static int
is_handled_by (_Unwind_Ptr choice, _GNAT_Exception * propagated_exception)
@@ -1142,7 +1140,6 @@ PERSONALITY_FUNCTION (version_arg_t version_arg,
{
if (action.kind == cleanup)
{
- Adjust_N_Cleanups_For (gnat_exception, 1);
return _URC_CONTINUE_UNWIND;
}
else
@@ -1160,14 +1157,6 @@ PERSONALITY_FUNCTION (version_arg_t version_arg,
occurrence (we are in a FORCED_UNWIND phase in this case). Install the
context to get there. */
- /* If we are going to install a cleanup context, decrement the cleanup
- count. This is required in a FORCED_UNWINDing phase (for an unhandled
- exception), as this is used from the forced unwinding handler in
- Ada.Exceptions.Exception_Propagation to decide whether unwinding should
- proceed further or Unhandled_Exception_Terminate should be called. */
- if (action.kind == cleanup)
- Adjust_N_Cleanups_For (gnat_exception, -1);
-
setup_to_install
(uw_context, uw_exception, action.landing_pad, action.ttype_filter);