OSDN Git Service

* config/linux.h (ASM_COMMENT_START): Remove from here,
[pf3gnuchains/gcc-fork.git] / gcc / except.c
index de538fa..4d69240 100644 (file)
@@ -1,5 +1,5 @@
 /* Implements exception handling.
-   Copyright (C) 1989, 92-96, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1989, 92-97, 1998 Free Software Foundation, Inc.
    Contributed by Mike Stump <mrs@cygnus.com>.
 
 This file is part of GNU CC.
@@ -107,7 +107,7 @@ Boston, MA 02111-1307, USA.  */
    throw. On machines that have unwind info support, __throw is generated
    by code in libgcc2.c, otherwise __throw is generated on a
    per-object-file basis for each source file compiled with
-   -fexceptions by the the C++ frontend.  Before __throw is invoked,
+   -fexceptions by the C++ frontend.  Before __throw is invoked,
    the current context of the throw needs to be placed in the global
    variable __eh_pc.
 
@@ -390,7 +390,7 @@ Boston, MA 02111-1307, USA.  */
 
 #include "config.h"
 #include "defaults.h"
-#include <stdio.h>
+#include "system.h"
 #include "rtl.h"
 #include "tree.h"
 #include "flags.h"
@@ -404,10 +404,7 @@ Boston, MA 02111-1307, USA.  */
 #include "insn-config.h"
 #include "recog.h"
 #include "output.h"
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#include "toplev.h"
 
 /* One to use setjmp/longjmp method of generating code for exception
    handling.  */
@@ -486,9 +483,21 @@ struct label_node *outer_context_label_stack = NULL;
 
 struct label_node *false_label_stack = NULL;
 
-rtx expand_builtin_return_addr PROTO((enum built_in_function, int, rtx));
+static void push_eh_entry      PROTO((struct eh_stack *));
+static struct eh_entry * pop_eh_entry          PROTO((struct eh_stack *));
+static void enqueue_eh_entry   PROTO((struct eh_queue *, struct eh_entry *));
+static struct eh_entry * dequeue_eh_entry      PROTO((struct eh_queue *));
+static rtx call_get_eh_context PROTO((void));
+static void start_dynamic_cleanup              PROTO((tree, tree));
+static void start_dynamic_handler              PROTO((void));
 static void expand_rethrow     PROTO((rtx));
+static void output_exception_table_entry       PROTO((FILE *, int));
+static int can_throw           PROTO((rtx));
+static rtx scan_region         PROTO((rtx, int, int *));
+static void eh_regs            PROTO((rtx *, rtx *, int));
+static void set_insn_eh_region PROTO((rtx *, int));
 
+rtx expand_builtin_return_addr PROTO((enum built_in_function, int, rtx));
 \f
 /* Various support routines to manipulate the various data structures
    used by the exception handling code.  */
@@ -623,7 +632,7 @@ dequeue_eh_entry (queue)
   return tempentry;
 }
 \f
-/* Routine to see if exception exception handling is turned on.
+/* Routine to see if exception handling is turned on.
    DO_WARN is non-zero if we want to inform the user that exception
    handling is turned off. 
 
@@ -956,7 +965,7 @@ start_dynamic_handler ()
    This routine notices one particular common case in C++ code
    generation, and optimizes it so as to not need the exception
    region.  It works by creating a dynamic cleanup action, instead of
-   of a using an exception region.  */
+   a using an exception region.  */
 
 int
 expand_eh_region_start_tree (decl, cleanup)
@@ -1540,7 +1549,7 @@ exception_table_p ()
   return 0;
 }
 
-/* Output the entry of the exception table corresponding to to the
+/* Output the entry of the exception table corresponding to the
    exception region numbered N to file FILE. 
 
    N is the code label number corresponding to the handler of the
@@ -2174,7 +2183,8 @@ expand_builtin_set_eh_regs (handler, offset)
 static int *insn_eh_region = (int *)0;
 static int maximum_uid;
 
-static void set_insn_eh_region (first, region_num)
+static void
+set_insn_eh_region (first, region_num)
      rtx *first;
      int region_num;
 {