diff options
Diffstat (limited to 'gcc/cp/tree.c')
| -rw-r--r-- | gcc/cp/tree.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |
