typeck.c (unary_complex_lvalue): Ignore op0 when taking the address of an OFFSET_REF.
authorJason Merrill <jason@yorick.cygnus.com>
Thu, 18 Dec 1997 15:07:48 +0000 (15:07 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 18 Dec 1997 15:07:48 +0000 (10:07 -0500)
* typeck.c (unary_complex_lvalue): Ignore op0 when taking the
address of an OFFSET_REF.

From-SVN: r17134

gcc/cp/ChangeLog
gcc/cp/typeck.c

index c320ff1..ca47cfd 100644 (file)
@@ -1,5 +1,8 @@
 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
+       * 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.
index 3656187..5251241 100644 (file)
@@ -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,