aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@cygnus.com>1998-06-08 12:43:28 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>1998-06-08 12:43:28 +0000
commita1622f838f1188fca74ba0186300882f33006ae7 (patch)
tree8c6db0a08fe59e66faaa88318e5d8e194578463d /gcc/cp/except.c
parentaeb302bbec86aff44fadaad0c9c9bf5e59cbe3f5 (diff)
downloadgcc-a1622f838f1188fca74ba0186300882f33006ae7.zip
gcc-a1622f838f1188fca74ba0186300882f33006ae7.tar.gz
gcc-a1622f838f1188fca74ba0186300882f33006ae7.tar.bz2
[multiple changes]
Thu Jun 8 14:16:15 EDT 1998 Andrew MacLeod <amacleod@cygnus.com> * eh-common.h: Remove NEW_EH_MODEL compile time flag, and replace with flag_new_exceptions runtime flag. (struct old_exception_table): New struct which represents what the exception table looks like without the new model. (NEW_EH_RUNTIME): New value used as a tag in the exception table to flag that this is a new style table. * except.h: Remove compile time flag NEW_EH_MODEL. (expand_builtin_eh_stub_old): New prototype. * tree.h (enum built_in_function): Add BUILT_IN_EH_STUB_OLD. * expr.c (expand_builtin): New builtin func BUILT_IN_EH_STUB_OLD. * c-decl.c (init_decl_processing): Add new builtin function __builtin_eh_stub_old. * final.c (final_scan_insn): Replace compile time flag NEW_EH_MODEL. * flags.h (flag_new_exceptions): New runtime flag. * toplev.c (flag_new_exceptions): Initialize default to 0, -fnew-exceptions sets to 1. * except.c (output_exception_table_entry): Output New style exception identifier into table, and replace compile time flag NEW_EH_MODEL with runtime flag flag_new_exceptions. (output_exception_table): Replace compile time flag NEW_EH_MODEL. (expand_builtin_eh_stub_old): Duplicates original functionality of expand_builtin_eh_stub. (expand_builtin_eh_stub): Replace compile time flag NEW_EH_MODEL. * libgcc2.c (find_exception_handler): Remove NEW_EH_MODEL #ifdefs. (old_find_exception_handler): New func, same as find_exception_handler except it works on the old style exception table. (__throw): Replace NEW_EH_MODEL. Detect new model based on presence of identifier in the exception table, and call appropriate routines. 1998-06-08 Andrew MacLeod <amacleod@cygnus.com> * except.c (init_exception_processing): Remove NEW_EH_MODEL compile time flag. Call __cp_eh_info instead of __cp_exception_info. * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag. (__cp_exception_info): Return offset into cp_eh_info structure to match what use to be the start of this structure. (__cp_eh_info): New function to return a pointer to cp_eh_info struct. (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL compile time flag. (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call __cp_eh_info instead of __cp_exception_info. From-SVN: r20336
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r--gcc/cp/except.c35
1 files changed, 12 insertions, 23 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 89dee7e..44e250c 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -203,10 +203,8 @@ init_exception_processing ()
push_lang_context (lang_name_c);
-#ifdef NEW_EH_MODEL
set_exception_lang_code (EH_LANG_C_plus_plus);
set_exception_version_code (1);
-#endif
CatchMatch
= builtin_function (flag_rtti
@@ -245,25 +243,20 @@ call_eh_info ()
{
tree fn;
- fn = get_identifier ("__cp_exception_info");
+ fn = get_identifier ("__cp_eh_info");
if (IDENTIFIER_GLOBAL_VALUE (fn))
fn = IDENTIFIER_GLOBAL_VALUE (fn);
else
{
-#ifdef NEW_EH_MODEL
- tree t1;
-#endif
- tree t, fields[7];
- int fo = 0;
+ tree t1, t, fields[7];
- /* Declare cp_eh_info * __cp_exception_info (void),
+ /* Declare cp_eh_info * __cp_eh_info (void),
as defined in exception.cc. */
push_obstacks_nochange ();
end_temporary_allocation ();
/* struct cp_eh_info. This must match exception.cc. Note that this
type is not pushed anywhere. */
-#ifdef NEW_EH_MODEL
t1= make_lang_type (RECORD_TYPE);
fields[0] = build_lang_field_decl (FIELD_DECL,
get_identifier ("handler_label"), ptr_type_node);
@@ -288,31 +281,27 @@ call_eh_info ()
/* N.B.: The fourth field LEN is expected to be
the number of fields - 1, not the total number of fields. */
finish_builtin_type (t1, "__eh_info", fields, 3, ptr_type_node);
- fo = 1;
-#endif
t = make_lang_type (RECORD_TYPE);
-#ifdef NEW_EH_MODEL
- fields[0] = build_lang_field_decl (FIELD_DECL, get_identifier ("eh_info"),
- t1);
-#endif
- fields[0+fo] = build_lang_field_decl (FIELD_DECL, get_identifier ("value"),
+ fields[0] = build_lang_field_decl (FIELD_DECL,
+ get_identifier ("eh_info"), t1);
+ fields[1] = build_lang_field_decl (FIELD_DECL, get_identifier ("value"),
ptr_type_node);
- fields[1+fo] = build_lang_field_decl (FIELD_DECL, get_identifier ("type"),
+ fields[2] = build_lang_field_decl (FIELD_DECL, get_identifier ("type"),
ptr_type_node);
- fields[2+fo] = build_lang_field_decl
+ fields[3] = build_lang_field_decl
(FIELD_DECL, get_identifier ("cleanup"),
build_pointer_type (build_function_type
(ptr_type_node, tree_cons
(NULL_TREE, ptr_type_node, void_list_node))));
- fields[3+fo] = build_lang_field_decl (FIELD_DECL, get_identifier ("caught"),
+ fields[4] = build_lang_field_decl (FIELD_DECL, get_identifier ("caught"),
boolean_type_node);
- fields[4+fo] = build_lang_field_decl (FIELD_DECL, get_identifier ("next"),
+ fields[5] = build_lang_field_decl (FIELD_DECL, get_identifier ("next"),
build_pointer_type (t));
- fields[5+fo] = build_lang_field_decl
+ fields[6] = build_lang_field_decl
(FIELD_DECL, get_identifier ("handlers"), long_integer_type_node);
/* N.B.: The fourth field LEN is expected to be
the number of fields - 1, not the total number of fields. */
- finish_builtin_type (t, "cp_eh_info", fields, 5+fo, ptr_type_node);
+ finish_builtin_type (t, "cp_eh_info", fields, 6, ptr_type_node);
t = build_pointer_type (t);
/* And now the function. */