/* Exception support for GNU CHILL.
WARNING: Only works for native (needs setjmp.h)! FIXME!
- Copyright (C) 1992, 93, 1994, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1994, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GNU CC.
static tree jbuf_ident, prev_ident, handlers_ident;
static tree exception_stack_decl = 0;
-/* Chain of cleanups assocated with exception handlers.
+/* Chain of cleanups associated with exception handlers.
The TREE_PURPOSE is an INTEGER_CST whose value is the
DECL_ACTION_NESTING_LEVEL (when the handled actions was entered).
The TREE_VALUE is an expression to expand when we exit that action. */
if (pass == 1)
{
struct handler_state *old = current_handler;
+
if (old == NULL)
- fatal ("internal error: on stack out of sync");
+ abort ();
current_handler = old->next;
if (used)
/* We temporarily reset the maximum_field_alignment to zero so the
compiler's exception data structures can be compatible with the
run-time system, even when we're compiling with -fpack. */
- extern int maximum_field_alignment;
- int save_maximum_field_alignment = maximum_field_alignment;
+ unsigned int save_maximum_field_alignment = maximum_field_alignment;
maximum_field_alignment = 0;
push_obstacks_nochange ();
end_temporary_allocation ();
chill_handle_on_labels (labels)
tree labels;
{
- int alternative = ++current_handler->prev_on_alternative;
+ unsigned int alternative = ++current_handler->prev_on_alternative;
if (pass == 1)
{
tree handler_number = build_int_2 (alternative, 0);
else
{
/* Find handler_number saved in pass 1. */
- tree tmp = current_handler->on_alt_list;
- while (TREE_INT_CST_LOW (TREE_PURPOSE (tmp)) != alternative)
- tmp = TREE_CHAIN (tmp);
+ tree tmp;
+
+ for (tmp = current_handler->on_alt_list;
+ compare_tree_int (TREE_PURPOSE (tmp), alternative) != 0;
+ tmp = TREE_CHAIN (tmp))
+ ;
+
if (expand_exit_needed)
expand_exit_something (), expand_exit_needed = 0;
chill_handle_case_label (TREE_PURPOSE (tmp),
chill_check_no_handlers ()
{
if (current_handler != NULL)
- fatal ("internal error: on stack not empty when done");
+ abort ();
}
static void
tree last = NULL_TREE;
for ( ; list != NULL_TREE; list = TREE_CHAIN (list))
{
- if (TREE_INT_CST_LOW (TREE_PURPOSE (list)) > label_level)
+ if (compare_tree_int (TREE_PURPOSE (list), label_level) > 0)
last = list;
else
break;