The operands of binary operators do implicit conversions:
- If either
operand has type
long double, the other operand is converted to
long double.
- If either operand has type
double, the other operand is converted to
double.
- If either operand has type
float, the other operand is converted to
float.
- The integral promotions are performed on both operands.
The following rules are applied:
- If either operand has type
unsigned long int, the other operand is converted to
unsigned long int.
- If one operand has type
longint and the other has type
unsignedint, then:
- if a
longint can represent all values of an
unsignedint, the operand of type
unsignedint is converted to
longint;
- if a
long int cannot represent all the values of an
unsignedint, both operands are converted to
unsignedlongint.
- If either operand has type
longint, the other operand is converted to
longint.
- If either operand has type
unsignedint, the other operand is converted to
unsignedint.
- Both operands have type
int.