/*-----------------------------------------------------------------*/
/* perform "usual unary conversions" */
/*-----------------------------------------------------------------*/
+#if 0
static operand *
usualUnaryConversions (operand * op)
{
}
return op;
}
+#endif
/*-----------------------------------------------------------------*/
/* perform "usual binary conversions" */
sym_link *ltype = operandType (left);
sym_link *letype = getSpec (ltype);
- resType = usualBinaryConversions (&left, &right, TRUE, FALSE);
+ resType = usualBinaryConversions (&left, &right,
+ (IS_UNSIGNED (retype) && IS_UNSIGNED (letype)) ? FALSE : TRUE,
+ FALSE);
/* if the right is a literal & power of 2
and left is unsigned then make it a
return operandFromValue (valMod (left->operand.valOperand,
right->operand.valOperand));
- resType = usualBinaryConversions (&left, &right, TRUE, FALSE);
+ resType = usualBinaryConversions (&left, &right,
+ (IS_UNSIGNED (retype) && IS_UNSIGNED (letype)) ? FALSE : TRUE,
+ FALSE);
/* now they are the same size */
ic = newiCode ('%', left, right);
{
iCode *ic;
- left = usualUnaryConversions (left);
ic = newiCode (LEFT_OP, left, right);
IC_RESULT (ic) = newiTempOperand (operandType (left), 0);
ADDTOCHAIN (ic);