Deleted Added
full compact
except.c (132727) except.c (146906)
1/* Handle exceptional things in C++.
2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4 Contributed by Michael Tiemann <tiemann@cygnus.com>
5 Rewritten by Mike Stump <mrs@cygnus.com>, based upon an
6 initial re-implementation courtesy Tad Hunt.
7
8This file is part of GCC.

--- 596 unchanged lines hidden (view full) ---

605 {
606 tree throw_type;
607 tree cleanup;
608 tree object, ptr;
609 tree tmp;
610 tree temp_expr, allocate_expr;
611 bool elided;
612
1/* Handle exceptional things in C++.
2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4 Contributed by Michael Tiemann <tiemann@cygnus.com>
5 Rewritten by Mike Stump <mrs@cygnus.com>, based upon an
6 initial re-implementation courtesy Tad Hunt.
7
8This file is part of GCC.

--- 596 unchanged lines hidden (view full) ---

605 {
606 tree throw_type;
607 tree cleanup;
608 tree object, ptr;
609 tree tmp;
610 tree temp_expr, allocate_expr;
611 bool elided;
612
613 /* The CLEANUP_TYPE is the internal type of a destructor. */
614 if (!cleanup_type)
615 {
616 tmp = void_list_node;
617 tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
618 tmp = build_function_type (void_type_node, tmp);
619 cleanup_type = build_pointer_type (tmp);
620 }
621
613 fn = get_identifier ("__cxa_throw");
614 if (!get_global_value_if_present (fn, &fn))
615 {
622 fn = get_identifier ("__cxa_throw");
623 if (!get_global_value_if_present (fn, &fn))
624 {
616 /* The CLEANUP_TYPE is the internal type of a destructor. */
617 if (cleanup_type == NULL_TREE)
618 {
619 tmp = void_list_node;
620 tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
621 tmp = build_function_type (void_type_node, tmp);
622 cleanup_type = build_pointer_type (tmp);
623 }
624
625 /* Declare void __cxa_throw (void*, void*, void (*)(void*)). */
626 /* ??? Second argument is supposed to be "std::type_info*". */
627 tmp = void_list_node;
628 tmp = tree_cons (NULL_TREE, cleanup_type, tmp);
629 tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
630 tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
631 tmp = build_function_type (void_type_node, tmp);
632 fn = push_throw_library_fn (fn, tmp);
633 }
625 /* Declare void __cxa_throw (void*, void*, void (*)(void*)). */
626 /* ??? Second argument is supposed to be "std::type_info*". */
627 tmp = void_list_node;
628 tmp = tree_cons (NULL_TREE, cleanup_type, tmp);
629 tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
630 tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
631 tmp = build_function_type (void_type_node, tmp);
632 fn = push_throw_library_fn (fn, tmp);
633 }
634
634
635 /* throw expression */
636 /* First, decay it. */
637 exp = decay_conversion (exp);
638
639 /* OK, this is kind of wacky. The standard says that we call
640 terminate when the exception handling mechanism, after
641 completing evaluation of the expression to be thrown but
642 before the exception is caught (_except.throw_), calls a

--- 282 unchanged lines hidden ---
635 /* throw expression */
636 /* First, decay it. */
637 exp = decay_conversion (exp);
638
639 /* OK, this is kind of wacky. The standard says that we call
640 terminate when the exception handling mechanism, after
641 completing evaluation of the expression to be thrown but
642 before the exception is caught (_except.throw_), calls a

--- 282 unchanged lines hidden ---