...
Integer promotions require the promotion of each variable (c1 and c2) to int size. The two int values are added, and the sum is truncated to fit into the char type. Integer promotions are performed to avoid arithmetic errors resulting from the overflow of intermediate values:
...
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
INT02-C | mediumMedium | probableProbable | mediumMedium | P8 | L2 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| CC2.INT02 | Fully implemented | |||||||
| 52 S | Fully implemented | |||||||
| PRQA QA-C |
| 0290 | Fully implemented |
...
| [Dowd 2006] | Chapter 6, "C Language Issues" ("Type Conversions," pp. 223–270) | [ISO/IEC 9899:2011] | Subclause 6.3.1.1, "Boolean, Characters, and Integers" Subclause 6.3.1.3, "Signed and Unsigned Integers" |
| [Seacord 2013] | Chapter 5, "Integer Security" |
...