diff options
Diffstat (limited to 'gcc/cp')
| -rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/cp/tree.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f4255d6..14fc98f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2005-10-02 Mark Mitchell <mark@codesourcery.com> + + PR c++/23840 + * tree.c (lvalue_p1): A VA_ARG_EXPR with class type is an lvalue, + when class rvalues are lvalues. + 2005-09-28 Mark Mitchell <mark@codesourcery.com> PR c++/16782 diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 9c28f13..954a809 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -158,8 +158,12 @@ lvalue_p_1 (tree ref, case TARGET_EXPR: return treat_class_rvalues_as_lvalues ? clk_class : clk_none; - case CALL_EXPR: case VA_ARG_EXPR: + return (treat_class_rvalues_as_lvalues + && CLASS_TYPE_P (TREE_TYPE (ref)) + ? clk_class : clk_none); + + case CALL_EXPR: /* Any class-valued call would be wrapped in a TARGET_EXPR. */ return clk_none; |
