diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-11-19 11:54:53 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-11-19 11:54:53 +0100 |
commit | ee57599295edea9f7edd73768deab9cc526dc505 (patch) | |
tree | 6efa7bf4ecf82f27c400f99353c69a8bcca1b6c7 /gcc/ada/utils.c | |
parent | f5a0cbf1083ff9d9635c813929b89d9f831f4ec9 (diff) | |
download | gcc-ee57599295edea9f7edd73768deab9cc526dc505.zip gcc-ee57599295edea9f7edd73768deab9cc526dc505.tar.gz gcc-ee57599295edea9f7edd73768deab9cc526dc505.tar.bz2 |
a-exexpr.adb (Others_Value, [...]): New variables...
* 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.
<E_Procedure>: 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.
From-SVN: r90900
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r-- | gcc/ada/utils.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 50753af5..e2205d0 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -613,6 +613,20 @@ init_gigi_decls (tree long_long_float_type, tree exception_type) endlink)), NULL_TREE, false, true, true, NULL, Empty); + /* Dummy objects to materialize "others" and "all others" in the exception + tables. These are exported by a-exexpr.adb, so see this unit for the + types to use. */ + + others_decl + = create_var_decl (get_identifier ("OTHERS"), + get_identifier ("__gnat_others_value"), + integer_type_node, 0, 1, 0, 1, 1, 0, Empty); + + all_others_decl + = create_var_decl (get_identifier ("ALL_OTHERS"), + get_identifier ("__gnat_all_others_value"), + integer_type_node, 0, 1, 0, 1, 1, 0, Empty); + /* Hooks to call when entering/leaving an exception handler. */ begin_handler_decl = create_subprog_decl (get_identifier ("__gnat_begin_handler"), NULL_TREE, @@ -1550,7 +1564,7 @@ process_attributes (tree decl, struct attrib *attr_list) switch (attr_list->type) { case ATTR_MACHINE_ATTRIBUTE: - decl_attributes (&decl, tree_cons (attr_list->name, attr_list->arg, + decl_attributes (&decl, tree_cons (attr_list->name, attr_list->args, NULL_TREE), ATTR_FLAG_TYPE_IN_PLACE); break; |