except.c (expand_throw): Call build_delete for all exception types, not just objects with destructors.

* except.c (expand_throw): Call build_delete for all
	exception types, not just objects with destructors.

From-SVN: r15207
This commit is contained in:
Jason Merrill 1997-09-09 20:59:16 -04:00
parent c82af01654
commit a2676865a6
3 changed files with 4174 additions and 4129 deletions

View File

@ -3,6 +3,11 @@
* typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
c-typeck.c.
Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
* except.c (expand_throw): Call build_delete for all
exception types, not just objects with destructors.
Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
* decl.c (current_local_enum): Remove static.
@ -46,6 +51,48 @@ Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
* class.c (grow_method): Remove check for redeclaration.
Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
* cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
(DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
(PRIMARY_TEMPLATE_P): Use it.
* call.c (build_overload_call_real): Use it.
* class.c (instantiate_type): Likewise.
* decl.c (decls_match): Likewise.
* method.c (build_overload_identifier): Likewise.
* pt.c (push_template_decl): Likewise.
(classtype_mangled_name): Likewise.
(lookup_template_class): Likewise.
* cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
DECL_NTPARMS to conform to usage elsewhere.
* call.c (add_template_candidate): Likewise.
* class.c (instantiate_type): Likewise.
* pt.c (instantiate_template): Likewise.
(get_bindings): Likewise.
* class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
is_member_template.
* pt.c (unify): Undo changes to allow multiple levels of template
parameters.
(type_unification): Likewise.
(fn_type_unification): Likewise.
(get_class_bindings): Likewise.
* cp-tree.h (Likewise).
* decl.c (replace_defarg): Check that the type of the default
parameter does not invlove a template type before complaining
about the initialization.
* error.c (dump_expr): Deal with template constant parameters in
member templates correctly.
* pt.c (is_member_template): Deal with class specializations
correctly.
(tsubst): Handle "partial instantiation" of member templates
correctly.
Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
* pt.c (type_unification): Change calling squence to allow for

View File

@ -1142,27 +1142,14 @@ expand_throw (exp)
object = build_indirect_ref (exp, NULL_PTR);
throw_type = build_eh_type (object);
start_sequence ();
object = build_reinterpret_cast (TREE_TYPE (exp), saved_throw_value);
object = build_indirect_ref (object, NULL_PTR);
cleanup = maybe_build_cleanup_and_delete (object);
end_sequence ();
/* Build __tcf_ function. */
cleanup = start_anon_func ();
object = build_delete (TREE_TYPE (exp), saved_throw_value,
integer_three_node, LOOKUP_NORMAL|LOOKUP_DESTRUCTOR, 0);
expand_expr (object, const0_rtx, VOIDmode, 0);
end_anon_func ();
mark_addressable (cleanup);
if (cleanup)
{
cleanup = start_anon_func ();
expand_expr (maybe_build_cleanup_and_delete (object),
const0_rtx, VOIDmode, 0);
end_anon_func ();
mark_addressable (cleanup);
}
else
{
cleanup = empty_fndecl;
}
}
if (cleanup == empty_fndecl)

File diff suppressed because it is too large Load Diff