20-10-2016, 11:46 PM
Thank you. But I think unreachable code should be detected by Rule 2.1.
What confuses me is the phrase "The conversion .. to the promoted type of the controlling expression".
In this sample code, x is promoted to int(int16_t or int32_t) and -1 is converted to int.
As a result int is assigned to int. It should be compliant.
I may understand if the phrase is "The conversion .. to the essential type of the controlling expression".
What confuses me is the phrase "The conversion .. to the promoted type of the controlling expression".
In this sample code, x is promoted to int(int16_t or int32_t) and -1 is converted to int.
As a result int is assigned to int. It should be compliant.
I may understand if the phrase is "The conversion .. to the essential type of the controlling expression".
<t></t>