diff options
| author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-16 22:30:06 +0000 |
|---|---|---|
| committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-16 22:30:06 +0000 |
| commit | 574b70a0456f4245e566533bcd077a10e890c620 (patch) | |
| tree | ec99a75428f993f32c99bfc7522559768ef6c379 /gcc/cp/call.c | |
| parent | 3be54c77608ff085d398dd4341b767d6f98d3fec (diff) | |
| download | ppe42-gcc-574b70a0456f4245e566533bcd077a10e890c620.tar.gz ppe42-gcc-574b70a0456f4245e566533bcd077a10e890c620.zip | |
* call.c (convert_like_real): Create a temporary for non-lvalue.
* g++.old-deja/g++.other/init16.C: Update the test so that it does
not need <string> and also tests the initialization at runtime.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39776 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/call.c')
| -rw-r--r-- | gcc/cp/call.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 11cb6404054..7e2124fe8d0 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -3850,7 +3850,7 @@ convert_like_real (convs, expr, fn, argnum, inner) tree ref_type = totype; /* If necessary, create a temporary. */ - if (NEED_TEMPORARY_P (convs)) + if (NEED_TEMPORARY_P (convs) || !lvalue_p (expr)) { tree type = TREE_TYPE (TREE_OPERAND (convs, 0)); expr = build_target_expr_with_type (expr, type); |

