diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-25 00:28:51 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-25 00:28:51 +0000 |
commit | 011310f7efb41af6d506578e2c522e3a0c475dd7 (patch) | |
tree | cf3cbdee8f712a2f2011ea2b09eae4a9ea25960f /gcc/cp/except.c | |
parent | b6f1e3797969e74fe81236e58290674743c76bcb (diff) | |
download | gcc-011310f7efb41af6d506578e2c522e3a0c475dd7.tar.gz |
* except.c (expand_throw): Use cp_finish_decl for the throw temp.
* cvt.c (build_up_reference): Pass DIRECT_BIND down into
cp_finish_decl.
* init.c (expand_default_init): Check for DIRECT_BIND instead of
DECL_ARTIFICIAL.
Fixes Sec15/1/P15140.C, g++.eh/ctor1.C.
* call.c (build_over_call): Use build_decl.
* except.c (expand_throw): Just use convert, not
build_reinterpret_cast.
Fixes Sec15/P15113.C.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23845 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r-- | gcc/cp/except.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c index a1d028e93ae..7da22cdd73e 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -687,7 +687,8 @@ process_start_catch_block (declspecs, declarator) decl = pushdecl (decl); start_decl_1 (decl); - cp_finish_decl (decl, init, NULL_TREE, 0, LOOKUP_ONLYCONVERTING); + cp_finish_decl (decl, init, NULL_TREE, 0, + LOOKUP_ONLYCONVERTING|DIRECT_BIND); } else { @@ -1027,13 +1028,11 @@ expand_throw (exp) ourselves into expand_call. */ if (TREE_SIDE_EFFECTS (exp)) { - tree temp = build (VAR_DECL, TREE_TYPE (exp)); + tree temp = build_decl (VAR_DECL, NULL_TREE, TREE_TYPE (exp)); DECL_ARTIFICIAL (temp) = 1; - layout_decl (temp, 0); DECL_RTL (temp) = assign_temp (TREE_TYPE (exp), 2, 0, 1); - expand_expr (build (INIT_EXPR, TREE_TYPE (exp), temp, exp), - NULL_RTX, VOIDmode, 0); - expand_decl_cleanup (NULL_TREE, maybe_build_cleanup (temp)); + DECL_INITIAL (temp) = exp; + cp_finish_decl (temp, exp, NULL_TREE, 0, LOOKUP_ONLYCONVERTING); exp = temp; } #endif @@ -1072,7 +1071,7 @@ expand_throw (exp) /* Cast EXP to `void *' so that it will match the prototype for __cp_push_exception. */ - exp = build_reinterpret_cast (ptr_type_node, exp); + exp = convert (ptr_type_node, exp); if (cleanup == NULL_TREE) { |