semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in call to build_aggr_init.

* semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
	call to build_aggr_init.
	* cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.

From-SVN: r47793
This commit is contained in:
John David Anglin 2001-12-08 15:44:23 +00:00 committed by John David Anglin
parent cb97d97dee
commit 46af705afa
3 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
* semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
call to build_aggr_init.
* cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
* parse.y: Replace uses of the string non-terminal with STRING.

View File

@ -3312,7 +3312,10 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
LOOKUP_ONLYCONVERTING means that non-conversion constructors are not tried.
DIRECT_BIND means that if a temporary is created, it should be created so
that it lives as long as the current variable bindings; otherwise it
only lives until the end of the complete-expression.
only lives until the end of the complete-expression. It also forces
direct-initialization in cases where other parts of the compiler have
already generated a temporary, such as reference initialization and the
catch parameter.
LOOKUP_SPECULATIVELY means return NULL_TREE if we cannot find what we are
after. Note, LOOKUP_COMPLAIN is checked and error messages printed
before LOOKUP_SPECULATIVELY is checked.

View File

@ -2320,7 +2320,8 @@ simplify_aggr_init_exprs_r (tp, walk_subtrees, data)
int old_ac = flag_access_control;
flag_access_control = 0;
call_expr = build_aggr_init (slot, call_expr, LOOKUP_ONLYCONVERTING);
call_expr = build_aggr_init (slot, call_expr,
DIRECT_BIND | LOOKUP_ONLYCONVERTING);
flag_access_control = old_ac;
copy_from_buffer_p = 1;
}