aboutsummaryrefslogtreecommitdiff
path: root/gcc/convert.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/convert.c')
-rw-r--r--gcc/convert.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index dd1b91a4e0b..b97d08fa4f7 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -310,13 +310,13 @@ convert_to_integer (type, expr)
{
/* Don't do unsigned arithmetic where signed was wanted,
or vice versa.
- Exception: if either of the original operands were
+ Exception: if both of the original operands were
unsigned then can safely do the work as unsigned.
And we may need to do it as unsigned
if we truncate to the original size. */
typex = ((TREE_UNSIGNED (TREE_TYPE (expr))
- || TREE_UNSIGNED (TREE_TYPE (arg0))
- || TREE_UNSIGNED (TREE_TYPE (arg1)))
+ || (TREE_UNSIGNED (TREE_TYPE (arg0))
+ && TREE_UNSIGNED (TREE_TYPE (arg1))))
? unsigned_type (typex) : signed_type (typex));
return convert (type,
fold (build (ex_form, typex,