diff options
author | Jeff Sturm <jsturm@one-point.com> | 2004-01-22 23:45:10 +0000 |
---|---|---|
committer | Jeff Sturm <jsturm@gcc.gnu.org> | 2004-01-22 23:45:10 +0000 |
commit | 5238574fae6c60a39edfcc32a943f856b08b0ad9 (patch) | |
tree | 57920265121dec0a6baaca47b994deeec16f94c2 /gcc/java | |
parent | 6ed0ecaf3064ca9eb0e537db3a9264ef1f8eee36 (diff) | |
download | gcc-5238574fae6c60a39edfcc32a943f856b08b0ad9.zip gcc-5238574fae6c60a39edfcc32a943f856b08b0ad9.tar.gz gcc-5238574fae6c60a39edfcc32a943f856b08b0ad9.tar.bz2 |
re PR java/13733 (The result of an assignment operator is the LHS after assignment, not the RHS)
PR java/13733
* parse.y (patch_assignment): Don't modify lhs_type for
reference assignments.
From-SVN: r76382
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/parse.y | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index d9027c0..5d9ae79 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2004-01-22 Jeff Sturm <jsturm@one-point.com> + + PR java/13733 + * parse.y (patch_assignment): Don't modify lhs_type for + reference assignments. + 2004-01-20 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in: Replace $(docdir) with doc. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 20e6f9a..507e958 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -12652,8 +12652,8 @@ patch_assignment (tree node, tree wfl_op1) new_rhs = try_builtin_assignconv (wfl_op1, lhs_type, rhs); /* 5.2 If it failed, try a reference conversion */ - if (!new_rhs && (new_rhs = try_reference_assignconv (lhs_type, rhs))) - lhs_type = promote_type (rhs_type); + if (!new_rhs) + new_rhs = try_reference_assignconv (lhs_type, rhs); /* 15.25.2 If we have a compound assignment, convert RHS into the type of the LHS */ |