cp-tree.h, tree.c: New function non_cast_lvalue_p.
authorMatt Austern <austern@apple.com>
Fri, 13 Sep 2002 18:08:16 +0000 (18:08 +0000)
committerMatt Austern <austern@gcc.gnu.org>
Fri, 13 Sep 2002 18:08:16 +0000 (18:08 +0000)
commit6c6e776d78091abbf41d27cf42cdac5cd5693fff
tree03daa98a70f555ccc4b8fb9394928702aa0dc368
parentd5909a796384bd39e8b9ed6c883f78e47438ef5b
cp-tree.h, tree.c: New function non_cast_lvalue_p.

2002-09-13  Matt Austern  <austern@apple.com>
        * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
        * cp/call.c: Change call-by-const-reference mechanism to use
        non_cast_lvalue_p when deciding whether the create a temporary.
        We need a temporary when passing, e.g. (long) x by const ref.
        * testsuite/g++.dg/other/constref[12].C: New, regression tests for
        passing a cast expression to a function by const reference.

From-SVN: r57115
gcc/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/tree.c
gcc/testsuite/g++.dg/other/constref1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/constref2.C [new file with mode: 0644]