diff options
author | Jason Merrill <jason@redhat.com> | 2009-07-31 22:26:21 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-07-31 22:26:21 -0400 |
commit | 9771799c29d553ad28453dd5bf2e72d6be593531 (patch) | |
tree | af6722d746b28559306995a7a4806f6f9e2ea51c /gcc/cp/cvt.c | |
parent | d3e1e89e50a64005a622759d5b2c4a8d1a77393f (diff) | |
download | gcc-9771799c29d553ad28453dd5bf2e72d6be593531.zip gcc-9771799c29d553ad28453dd5bf2e72d6be593531.tar.gz gcc-9771799c29d553ad28453dd5bf2e72d6be593531.tar.bz2 |
call.c (reference_binding): Rename lvalue_p to is_lvalue.
* call.c (reference_binding): Rename lvalue_p to is_lvalue.
Do direct binding of "rvalues" in memory to rvalue references.
* tree.c (lvalue_p_1): Can't be both non-addressable lvalue and
"rvalue" in memory.
* typeck.c (build_static_cast_1): Do direct binding of memory
"rvalues" to rvalue references.
* cvt.c (cp_fold_convert): New.
* cp-tree.h: Declare it.
From-SVN: r150325
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index c42d21c..cdc6a10 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -539,7 +539,16 @@ force_rvalue (tree expr) return expr; } + +/* Fold away simple conversions, but make sure the result is an rvalue. */ + +tree +cp_fold_convert (tree type, tree expr) +{ + return rvalue (fold_convert (type, expr)); +} + /* C++ conversions, preference to static cast conversions. */ tree |