summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-18 06:29:26 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-18 06:29:26 +0000
commitb263e9b31eb1034665e085a79febbf6b419d455b (patch)
tree8243b03eb2cf1a518c5a43c3b68837b3c8b8c25e
parent1b988e858be0ca47e504299bc49ffa0a3a53fcdb (diff)
downloadppe42-gcc-b263e9b31eb1034665e085a79febbf6b419d455b.tar.gz
ppe42-gcc-b263e9b31eb1034665e085a79febbf6b419d455b.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24741 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/parse.c13
-rw-r--r--gcc/java/parse.y7
3 files changed, 20 insertions, 5 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 1b85e3f7ab0..35bc1b3cd8c 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
Sun Jan 17 21:55:42 1999 Jeffrey A Law (law@cygnus.com)
* Makefile.in (zextract.o): Add dependencies.
diff --git a/gcc/java/parse.c b/gcc/java/parse.c
index 8d7da905bef..161c2eeada1 100644
--- a/gcc/java/parse.c
+++ b/gcc/java/parse.c
@@ -2250,7 +2250,7 @@ static const short yycheck[] = { 3,
#define YYPURE 1
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/local/share/bison.simple"
+#line 3 "/local/aph/tx39/share/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -2443,7 +2443,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif
#endif
-#line 196 "/usr/local/share/bison.simple"
+#line 196 "/local/aph/tx39/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -4701,7 +4701,7 @@ case 492:
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 498 "/usr/local/share/bison.simple"
+#line 498 "/local/aph/tx39/share/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
@@ -11599,8 +11599,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;
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index c6805c29628..70b81b1903c 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;
OpenPOWER on IntegriCloud