From 13b802d70d691cdc8dd1157523d517f822313e88 Mon Sep 17 00:00:00 2001 From: charlet Date: Fri, 19 Nov 2004 10:54:53 +0000 Subject: * a-exexpr.adb (Others_Value, All_Others_Value): New variables, the address of which may be used to represent "others" and "all others" choices in exception tables, instead of the current harcoded (void *)0 and (void *)1. (Setup_Exception): Do nothing in the GNAT SJLJ case. * gigi.h (others_decl, all_others_decl): New decls representing the new Others_Value and All_Others_Value objects. (struct attrib): Rename "arg" component as "args", since GCC expects a list of arguments in there. * raise.c (GNAT_OTHERS, GNAT_ALL_OTHERS): Are now the address of the corresponding objects exported by a-exexpr, instead of hardcoded dummy addresses. * trans.c (Exception_Handler_to_gnu_zcx): Use the address of others_decl and all_others_decl instead of hardcoded dummy addresses to represent "others" and "all others" choices, which is cleaner and more flexible with respect to the possible eh pointer encoding policies. * utils.c (init_gigi_decls): Initialize others_decl and all_others_decl. (process_attributes): Account for the naming change of the "args" attribute list entry component. * decl.c (build_attr_list): Rename into prepend_attributes to allow cumulating attributes for different entities into a single list. (gnat_to_gnu_entity): Use prepend_attributes to build the list of attributes for the current entity and propagate first subtype attributes to other subtypes. : Attribute arguments are attr->args and not attr->arg any more. (build_attr_list): Ditto. Make attr->args a TREE_LIST when there is an argument provided, as this is what GCC expects. Use NULL_TREE instead of 0 for trees. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90900 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/raise.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gcc/ada/raise.c') diff --git a/gcc/ada/raise.c b/gcc/ada/raise.c index 77a712b63ed..7de1f7754b7 100644 --- a/gcc/ada/raise.c +++ b/gcc/ada/raise.c @@ -480,11 +480,13 @@ typedef struct } _GNAT_Exception; /* The two constants below are specific ttype identifiers for special - exception ids. Their value is currently hardcoded at the gigi level - (see N_Exception_Handler). */ + exception ids. Their type should match what a-exexpr exports. */ -#define GNAT_OTHERS ((_Unwind_Ptr) 0x0) -#define GNAT_ALL_OTHERS ((_Unwind_Ptr) 0x1) +extern const int __gnat_others_value; +#define GNAT_OTHERS ((_Unwind_Ptr) &__gnat_others_value) + +extern const int __gnat_all_others_value; +#define GNAT_ALL_OTHERS ((_Unwind_Ptr) &__gnat_all_others_value) /* Describe the useful region data associated with an unwind context. */ -- cgit v1.2.1