+2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * except.c (init_exception_processing): Use C90 prototype style.
+ (cp_protect_cleanup_actions): Likewise.
+ (prepare_eh_type): Likewise.
+ (build_eh_type_type): Likewise.
+ (build_exc_ptr): Likewise.
+ (do_begin_catch): Likewise.
+ (dtor_nothrow): Likewise.
+ (do_end_catch): Likewise.
+ (push_eh_cleanup): Likewise.
+ (decl_is_java_type): Likewise.
+ (choose_personality_routine): Likewise.
+ (initialize_handler_parm): Likewise.
+ (expand_start_catch_block): Likewise.
+ (expand_end_catch_block): Likewise.
+ (begin_eh_spec_block): Likewise.
+ (finish_eh_spec_block): Likewise.
+ (do_allocate_exception): Likewise.
+ (do_free_exception): Likewise.
+ (wrap_cleanups_r): Likewise.
+ (stabilize_throw_expr): Likewise.
+ (build_throw): Likewise.
+ (complete_ptr_ref_or_void_ptr_p): Likewise.
+ (is_admissible_throw_operand): Likewise.
+ (nothrow_libfn_p): Likewise.
+ (can_convert_eh): Likewise.
+ (check_handlers_1): Likewise.
+ (check_handlers): Likewise.
+
2003-03-06 Mark Mitchell <mark@codesourcery.com>
* call.c (merge_conversion_sequences): New function.
#include "toplev.h"
#include "tree-inline.h"
-static void push_eh_cleanup PARAMS ((tree));
-static tree prepare_eh_type PARAMS ((tree));
-static tree build_eh_type_type PARAMS ((tree));
-static tree do_begin_catch PARAMS ((void));
-static int dtor_nothrow PARAMS ((tree));
-static tree do_end_catch PARAMS ((tree));
-static void push_eh_cleanup PARAMS ((tree));
-static bool decl_is_java_type PARAMS ((tree decl, int err));
-static void initialize_handler_parm PARAMS ((tree, tree));
-static tree do_allocate_exception PARAMS ((tree));
-static tree stabilize_throw_expr PARAMS ((tree, tree *));
-static tree wrap_cleanups_r PARAMS ((tree *, int *, void *));
-static int complete_ptr_ref_or_void_ptr_p PARAMS ((tree, tree));
-static bool is_admissible_throw_operand PARAMS ((tree));
-static int can_convert_eh PARAMS ((tree, tree));
-static void check_handlers_1 PARAMS ((tree, tree));
-static tree cp_protect_cleanup_actions PARAMS ((void));
+static void push_eh_cleanup (tree);
+static tree prepare_eh_type (tree);
+static tree build_eh_type_type (tree);
+static tree do_begin_catch (void);
+static int dtor_nothrow (tree);
+static tree do_end_catch (tree);
+static void push_eh_cleanup (tree);
+static bool decl_is_java_type (tree decl, int err);
+static void initialize_handler_parm (tree, tree);
+static tree do_allocate_exception (tree);
+static tree stabilize_throw_expr (tree, tree *);
+static tree wrap_cleanups_r (tree *, int *, void *);
+static int complete_ptr_ref_or_void_ptr_p (tree, tree);
+static bool is_admissible_throw_operand (tree);
+static int can_convert_eh (tree, tree);
+static void check_handlers_1 (tree, tree);
+static tree cp_protect_cleanup_actions (void);
/* Sets up all the global eh stuff that needs to be initialized at the
start of compilation. */
void
-init_exception_processing ()
+init_exception_processing (void)
{
tree tmp;
propagated out of a cleanup region. */
static tree
-cp_protect_cleanup_actions ()
+cp_protect_cleanup_actions (void)
{
/* [except.terminate]
}
static tree
-prepare_eh_type (type)
- tree type;
+prepare_eh_type (tree type)
{
if (type == NULL_TREE)
return type;
matching field of the exception model. */
static tree
-build_eh_type_type (type)
- tree type;
+build_eh_type_type (tree type)
{
tree exp;
}
tree
-build_exc_ptr ()
+build_exc_ptr (void)
{
return build (EXC_PTR_EXPR, ptr_type_node);
}
exception has been handled. */
static tree
-do_begin_catch ()
+do_begin_catch (void)
{
tree fn;
NULL_TREE for a ... handler) will not throw an exception. */
static int
-dtor_nothrow (type)
- tree type;
+dtor_nothrow (tree type)
{
if (type == NULL_TREE)
return 0;
for the current catch block if no others are currently using it. */
static tree
-do_end_catch (type)
- tree type;
+do_end_catch (tree type)
{
tree fn, cleanup;
/* This routine creates the cleanup for the current exception. */
static void
-push_eh_cleanup (type)
- tree type;
+push_eh_cleanup (tree type)
{
finish_decl_cleanup (NULL_TREE, do_end_catch (type));
}
throw. */
static bool
-decl_is_java_type (decl, err)
- tree decl;
- int err;
+decl_is_java_type (tree decl, int err)
{
bool r = (TREE_CODE (decl) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE
__gxx_personality_(sj|v)0 in init_exception_processing - should it
be done here instead? */
void
-choose_personality_routine (lang)
- enum languages lang;
+choose_personality_routine (enum languages lang)
{
static enum {
chose_none,
/* Initialize the catch parameter DECL. */
static void
-initialize_handler_parm (decl, exp)
- tree decl;
- tree exp;
+initialize_handler_parm (tree decl, tree exp)
{
tree init;
tree init_type;
/* Call this to start a catch block. DECL is the catch parameter. */
tree
-expand_start_catch_block (decl)
- tree decl;
+expand_start_catch_block (tree decl)
{
tree exp = NULL_TREE;
tree type;
the label to jump to if this catch block didn't match. */
void
-expand_end_catch_block ()
+expand_end_catch_block (void)
{
if (! doing_eh (1))
return;
}
tree
-begin_eh_spec_block ()
+begin_eh_spec_block (void)
{
tree r = build_stmt (EH_SPEC_BLOCK, NULL_TREE, NULL_TREE);
add_stmt (r);
}
void
-finish_eh_spec_block (raw_raises, eh_spec_block)
- tree raw_raises;
- tree eh_spec_block;
+finish_eh_spec_block (tree raw_raises, tree eh_spec_block)
{
tree raises;
/* Return a pointer to a buffer for an exception object of type TYPE. */
static tree
-do_allocate_exception (type)
- tree type;
+do_allocate_exception (tree type)
{
tree fn;
directly, but see the comment for stabilize_throw_expr. */
static tree
-do_free_exception (ptr)
- tree ptr;
+do_free_exception (tree ptr)
{
tree fn;
Called from build_throw via walk_tree_without_duplicates. */
static tree
-wrap_cleanups_r (tp, walk_subtrees, data)
- tree *tp;
- int *walk_subtrees ATTRIBUTE_UNUSED;
- void *data ATTRIBUTE_UNUSED;
+wrap_cleanups_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
+ void *data ATTRIBUTE_UNUSED)
{
tree exp = *tp;
tree cleanup;
rather than in a MUST_NOT_THROW_EXPR, for this case only. */
static tree
-stabilize_throw_expr (exp, initp)
- tree exp;
- tree *initp;
+stabilize_throw_expr (tree exp, tree *initp)
{
tree init_expr;
/* Build a throw expression. */
tree
-build_throw (exp)
- tree exp;
+build_throw (tree exp)
{
tree fn;
the expr or decl from whence TYPE came, if available. */
static int
-complete_ptr_ref_or_void_ptr_p (type, from)
- tree type;
- tree from;
+complete_ptr_ref_or_void_ptr_p (tree type, tree from)
{
int is_ptr;
a type or of an abstract class type. */
static bool
-is_admissible_throw_operand (expr)
- tree expr;
+is_admissible_throw_operand (tree expr)
{
tree type = TREE_TYPE (expr);
#include "cfns.h"
int
-nothrow_libfn_p (fn)
- tree fn;
+nothrow_libfn_p (tree fn)
{
tree id;
handler for type TO, as per [except.handle]. */
static int
-can_convert_eh (to, from)
- tree to, from;
+can_convert_eh (tree to, tree from)
{
if (TREE_CODE (to) == REFERENCE_TYPE)
to = TREE_TYPE (to);
for B would catch an exception of type C. */
static void
-check_handlers_1 (master, handlers)
- tree master;
- tree handlers;
+check_handlers_1 (tree master, tree handlers)
{
tree type = TREE_TYPE (master);
tree handler;
/* Given a chain of HANDLERs, make sure that they're OK. */
void
-check_handlers (handlers)
- tree handlers;
+check_handlers (tree handlers)
{
tree handler;
int save_line = lineno;