diff options
author | John David Anglin <dave@hiauly1.hia.nrc.ca> | 2001-12-08 15:44:23 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2001-12-08 15:44:23 +0000 |
commit | 46af705afa95d7876d1048e8425b1180acd238a6 (patch) | |
tree | b3230bbc6a80df6837ae28e840a57f4441cf3c5b /gcc/cp | |
parent | cb97d97deebd67dc9988b51210f1432ecb924145 (diff) | |
download | gcc-46af705afa95d7876d1048e8425b1180acd238a6.zip gcc-46af705afa95d7876d1048e8425b1180acd238a6.tar.gz gcc-46af705afa95d7876d1048e8425b1180acd238a6.tar.bz2 |
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
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 5 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 3 |
3 files changed, 12 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8329fb3..26841bb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 420e2d9..992c708 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -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. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 75cfa69..776f06f 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -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; } |