OSDN Git Service

entered into RCS
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 May 1992 05:20:58 +0000 (05:20 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 May 1992 05:20:58 +0000 (05:20 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1110 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-typeck.c

index 53afdd0..699532e 100644 (file)
@@ -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.  */