* tree.c (mapcar): Handle LVALUE_EXPR.

From-SVN: r27101
This commit is contained in:
Mark Mitchell 1999-05-22 11:24:43 +00:00 committed by Mark Mitchell
parent 13bd191d0e
commit 9dd03dd98b
3 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,7 @@
1999-05-22 Mark Mitchell <mark@codesourcery.com>
* tree.c (mapcar): Handle LVALUE_EXPR.
* cp-tree.h (cplus_expand_constant): Declare.
* cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
converted from one pointer-to-object type to another.

View File

@ -1927,6 +1927,7 @@ mapcar (t, func)
case NOP_EXPR:
case COMPONENT_REF:
case CLEANUP_POINT_EXPR:
case NON_LVALUE_EXPR:
t = copy_node (t);
TREE_TYPE (t) = mapcar (TREE_TYPE (t), func);
TREE_OPERAND (t, 0) = mapcar (TREE_OPERAND (t, 0), func);

View File

@ -0,0 +1,10 @@
// Build don't link:
// Origin: Mark Mitchell <mark@codesourcery.com>
struct S {
S();
virtual int f() {
new S[+f()];
}
};