16-11-2016, 08:15 AM
Sorry for late reply.
In my understanding both operands are promoted to signed int based on the Integral promotion rule.
When a cotrol expression is "x", case -1: is not reachable.
But if the control expression is "x-1", case -1: is reachable when x is 0.
I still do not understand what kind of risk should be eliminated by the Amplification 2.
Essential type should be discussed in this rule instead of "The conversion .. to the promoted type".
In my understanding both operands are promoted to signed int based on the Integral promotion rule.
When a cotrol expression is "x", case -1: is not reachable.
But if the control expression is "x-1", case -1: is reachable when x is 0.
I still do not understand what kind of risk should be eliminated by the Amplification 2.
Essential type should be discussed in this rule instead of "The conversion .. to the promoted type".
<t></t>