From a488825355166655fb80931b3d1a28c1893658a7 Mon Sep 17 00:00:00 2001 From: jason Date: Thu, 18 Dec 1997 15:07:48 +0000 Subject: [PATCH] * typeck.c (unary_complex_lvalue): Ignore op0 when taking the address of an OFFSET_REF. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17134 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/typeck.c | 11 +---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c320ff1aa32..ca47cfdbb9e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ Thu Dec 18 14:43:19 1997 Jason Merrill + * typeck.c (unary_complex_lvalue): Ignore op0 when taking the + address of an OFFSET_REF. + * cp-tree.def: Add AGGR_INIT_EXPR. * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with AGGR_INIT_EXPR where appropriate. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 36561874324..52512417038 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -4672,16 +4672,7 @@ unary_complex_lvalue (code, arg) return error_mark_node; } - type = TREE_TYPE (TREE_OPERAND (arg, 0)); - - if (TREE_CODE (TREE_TYPE (arg)) == OFFSET_TYPE) - { - /* Add in the offset to the intermediate subobject, if any. */ - offset = get_delta_difference (TYPE_OFFSET_BASETYPE (TREE_TYPE (arg)), - type, - 0); - type = TYPE_OFFSET_BASETYPE (TREE_TYPE (arg)); - } + type = TYPE_OFFSET_BASETYPE (TREE_TYPE (arg)); /* Now in the offset to the final subobject. */ offset = size_binop (PLUS_EXPR, -- 2.11.4.GIT