Commit ce2e5191 by Nathan Sidwell Committed by Nathan Sidwell

pt.c (tsubst_expr, [...]): Don't process if tsubsting fails.

	* pt.c (tsubst_expr, DECL_STMT case): Don't process if
	tsubsting fails.

From-SVN: r36720
parent 79cc5312
2000-10-05 Nathan Sidwell <nathan@codesourcery.com> 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (tsubst_expr, DECL_STMT case): Don't process if
tsubsting fails.
2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
* spew.c (frob_id): New static function. * spew.c (frob_id): New static function.
(frob_opname): Use it. (frob_opname): Use it.
(yylex): Use it. (yylex): Use it.
......
...@@ -7145,17 +7145,20 @@ tsubst_expr (t, args, complain, in_decl) ...@@ -7145,17 +7145,20 @@ tsubst_expr (t, args, complain, in_decl)
init = DECL_INITIAL (decl); init = DECL_INITIAL (decl);
decl = tsubst (decl, args, complain, in_decl); decl = tsubst (decl, args, complain, in_decl);
init = tsubst_expr (init, args, complain, in_decl); init = tsubst_expr (init, args, complain, in_decl);
if (init) if (decl != error_mark_node)
DECL_INITIAL (decl) = error_mark_node; {
/* By marking the declaration as instantiated, we avoid if (init)
trying to instantiate it. Since instantiate_decl can't DECL_INITIAL (decl) = error_mark_node;
handle local variables, and since we've already done /* By marking the declaration as instantiated, we avoid
all that needs to be done, that's the right thing to trying to instantiate it. Since instantiate_decl can't
do. */ handle local variables, and since we've already done
if (TREE_CODE (decl) == VAR_DECL) all that needs to be done, that's the right thing to
DECL_TEMPLATE_INSTANTIATED (decl) = 1; do. */
maybe_push_decl (decl); if (TREE_CODE (decl) == VAR_DECL)
cp_finish_decl (decl, init, NULL_TREE, 0); DECL_TEMPLATE_INSTANTIATED (decl) = 1;
maybe_push_decl (decl);
cp_finish_decl (decl, init, NULL_TREE, 0);
}
} }
return decl; return decl;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment