diff options
author | Andrew Haley <aph@cygnus.com> | 1999-01-18 06:29:26 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 1999-01-18 06:29:26 +0000 |
commit | 73333a8791299c17951b58c25ba4857059432059 (patch) | |
tree | 8243b03eb2cf1a518c5a43c3b68837b3c8b8c25e /gcc/java/parse.y | |
parent | 47c3ed988be2da61c38d896925b8cede2fd67808 (diff) | |
download | gcc-73333a8791299c17951b58c25ba4857059432059.zip gcc-73333a8791299c17951b58c25ba4857059432059.tar.gz gcc-73333a8791299c17951b58c25ba4857059432059.tar.bz2 |
parse.y (patch_binop): Do a type conversion from signed to unsigned and then back to signed when...
1999-01-18 Andrew Haley <aph@cygnus.com>
* parse.y (patch_binop): Do a type conversion from signed to
unsigned and then back to signed when a ">>>" is found.
From-SVN: r24741
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r-- | gcc/java/parse.y | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index c6805c2..70b81b1 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -8961,8 +8961,13 @@ patch_binop (node, wfl_op1, wfl_op2) /* The >>> operator is a >> operating on unsigned quantities */ if (code == URSHIFT_EXPR && ! flag_emit_class_files) { - op1 = convert (unsigned_type (prom_type), op1); + tree utype = unsigned_type (prom_type); + op1 = convert (utype, op1); TREE_SET_CODE (node, RSHIFT_EXPR); + TREE_OPERAND (node, 0) = op1; + TREE_OPERAND (node, 1) = op2; + TREE_TYPE (node) = utype; + return convert (prom_type, node); } break; |