OSDN Git Service

* config/alpha/vms.h (INCLUDE_DEFAULTS): Add /gnu/lib/gcc-lib/include.
[pf3gnuchains/gcc-fork.git] / gcc / ch / except.c
index 92a9425..1c8ef24 100644 (file)
@@ -1,6 +1,7 @@
 /* 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.
 
@@ -129,7 +130,7 @@ static tree BISJ;
 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. */
@@ -360,8 +361,9 @@ pop_handler (used)
   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)
@@ -396,8 +398,7 @@ emit_setup_handler ()
       /* 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 ();
@@ -501,7 +502,7 @@ void
 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);
@@ -511,9 +512,13 @@ chill_handle_on_labels (labels)
   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),
@@ -535,7 +540,7 @@ void
 chill_check_no_handlers ()
 {
   if (current_handler != NULL)
-    fatal ("internal error: on stack not empty when done");
+    abort ();
 }
 
 static void
@@ -619,7 +624,7 @@ expand_goto_except_cleanup (label_level)
   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;