Some binary operators convert the types of their operands to yield a common type, which is also the type of the result. These are called the usual arithmetic conversions:
If either operand is type long double, the other operand is converted to long double.
Otherwise, if either operand has type double, the other operand is converted to double.
Otherwise, if either operand has type float, the other operand is converted to float.
Otherwise, the integral promotions are performed on both operands. Then, these rules are applied:
If either operand has type unsigned long long int, the other operator is converted to unsigned long long int.
If either operand has type long long int, the other operator is converted to long long int.
If either operand has type unsigned long int, the other operand is converted to unsigned long int.
Otherwise, when you compile on SPARC V9 only and specify cc -xc99=none, if one operand has type long int and the other has type unsigned int, both operands are converted to unsigned long int.
Otherwise, if either operand has type long int, the other operand is converted to long int.
Otherwise, if either operand has type unsigned int, the other operand is converted to unsigned int.