24.6 Integers
ISO Standard: | “Any extended integer types that exist in the implementation (C99 6.2.5).” |
Implementation: | There are no extended integer types. |
ISO Standard: | “Whether signed integer types are represented using sign and magnitude, two’s complement, or one’s complement, and whether the extraordinary value is a trap representation or an ordinary value (C99 6.2.6.2).” |
Implementation: | All integer types are represented as two’s complement, and all bit patterns are ordinary values. |
ISO Standard: | “The rank of any extended integer type relative to another extended integer type with the same precision (C99 6.3.1.1).” |
Implementation: | No extended integer types are supported. |
ISO Standard: | “The result of, or the signal raised by, converting an integer to a signed integer type when the value cannot be represented in an object of that type (C90 6.2.1.2, C99 6.3.1.3).” |
Implementation: | When converting value X to a type of width N, the value of the result is the Least Significant N bits of the 2’s complement representation of X. That is, X is truncated to N bits. No signal is raised. |
ISO Standard: | “The results of some bitwise operations on signed integers (C90 6.3, C99 6.5).” |
Implementation: | Bitwise operations on signed values act on the 2’s complement representation, including the sign bit. The result of a signed right shift expression is sign extended. C99 allows some aspects of signed '<<' to be undefined. The compiler does not do so. |