diff options
author | Andrew Pinski <apinski@apple.com> | 2004-08-23 18:28:11 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2004-08-23 11:28:11 -0700 |
commit | cbaa1b74423611037f0007ab238bf1e4b8b88a7d (patch) | |
tree | f9c665b61c5589279e05939654560e533509ddab | |
parent | 39dca114a945ec4f22b2a1f89a2bfd6434d433cd (diff) | |
download | gcc-cbaa1b74423611037f0007ab238bf1e4b8b88a7d.zip gcc-cbaa1b74423611037f0007ab238bf1e4b8b88a7d.tar.gz gcc-cbaa1b74423611037f0007ab238bf1e4b8b88a7d.tar.bz2 |
Revert earlier fix for PR 14029
2004-08-22 Andrew Pinski <apinski@apple.com>
Revert:
2004-08-22 Andrew Pinski <apinski@apple.com>
PR c++/14029
* typeck.c (build_unary_op): Use &a.b if the foldded lowered
expression is not constant.
[[Split portion of a mixed commit.]]
From-SVN: r86431.2
-rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8c74bc2..1c0f95e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2004-08-22 Andrew Pinski <apinski@apple.com> + + Revert: + 2004-08-22 Andrew Pinski <apinski@apple.com> + PR c++/14029 + * typeck.c (build_unary_op): Use &a.b if the foldded lowered + expression is not constant. + 2004-08-23 Nathan Sidwell <nathan@codesourcery.com> * name-lookup.c (pushdecl): Rename build_type_copy call. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index a614db5..01b969e 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -4123,11 +4123,6 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert) addr = fold (build2 (PLUS_EXPR, argtype, rval, cp_convert (argtype, byte_position (field)))); - - /* If the folded PLUS_EXPR is not a constant address, wrap - it in an ADDR_EXPR. */ - if (!TREE_CONSTANT (addr)) - addr = build_address (arg); } if (TREE_CODE (argtype) == POINTER_TYPE |