aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1997-12-18 15:07:48 +0000
committerJason Merrill <jason@gcc.gnu.org>1997-12-18 10:07:48 -0500
commit4cac94646f66267096686d2c1116466e19ad1784 (patch)
tree9a443a45d10f188ad434141689f4815f85dcdddc /gcc
parentbb1b857adc8b49eae4e5a7f5f46984450555dc33 (diff)
downloadgcc-4cac94646f66267096686d2c1116466e19ad1784.zip
gcc-4cac94646f66267096686d2c1116466e19ad1784.tar.gz
gcc-4cac94646f66267096686d2c1116466e19ad1784.tar.bz2
typeck.c (unary_complex_lvalue): Ignore op0 when taking the address of an OFFSET_REF.
* typeck.c (unary_complex_lvalue): Ignore op0 when taking the address of an OFFSET_REF. From-SVN: r17134
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/typeck.c11
2 files changed, 4 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c320ff1..ca47cfd 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 3656187..5251241 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,