aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-05-28 05:20:58 +0000
committerRichard Stallman <rms@gnu.org>1992-05-28 05:20:58 +0000
commite7951b3f2642bc5f777e177b6df1ba9e4d912988 (patch)
treec2117ee3293ee54e736f6a522d1539b68898079b /gcc
parent1185c45527d3ef1849feb1b9c24c21b96f2e06d7 (diff)
downloadgcc-e7951b3f2642bc5f777e177b6df1ba9e4d912988.zip
gcc-e7951b3f2642bc5f777e177b6df1ba9e4d912988.tar.gz
gcc-e7951b3f2642bc5f777e177b6df1ba9e4d912988.tar.bz2
entered into RCS
From-SVN: r1110
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-typeck.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 53afdd0..699532e 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -2569,12 +2569,16 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
final_type = result_type;
- /* Handle the case that OP0 does not *contain* a conversion
+ /* Handle the case that OP0 (or OP1) does not *contain* a conversion
but it *requires* conversion to FINAL_TYPE. */
- if (op0 == arg0 && TREE_TYPE (op0) != final_type)
+ if ((TYPE_PRECISION (TREE_TYPE (op0))
+ == TYPE_PRECISION (TREE_TYPE (arg0)))
+ && TREE_TYPE (op0) != final_type)
unsigned0 = TREE_UNSIGNED (TREE_TYPE (op0));
- if (op1 == arg1 && TREE_TYPE (op1) != final_type)
+ if ((TYPE_PRECISION (TREE_TYPE (op1))
+ == TYPE_PRECISION (TREE_TYPE (arg1)))
+ && TREE_TYPE (op1) != final_type)
unsigned1 = TREE_UNSIGNED (TREE_TYPE (op1));
/* Now UNSIGNED0 is 1 if ARG0 zero-extends to FINAL_TYPE. */