I am confused by the rules regarding this question [a good URL can save time in answering]. I notice that a lot of conversion time works implicitly, but in other cases it required.
eg. I expected this to work:
long long a;
int b;
[..]
a = b * 1000;
but it turns out that "a" overflows and is required
a = (long long) b * 1000;
It was weird, since "a" was "big," I expected it to bother.
In any case, apart from this example, do you know an exhaustive source of information on this issue? No "most of the time is OK," it paranoid me.
EDIT: This is only the question "the second part does the calculation first and there it overflows, follow this rule"?
EDIT2: If there is a calculation, for example
long long a;
int b;
short c;
[..]
c = b + a * 3;
would fulfill
c = b + (int) a * 3;
?
c = (short) b + (int) a * 3;
, ,
c = (short) b + a * 3;