gcc: Integers implementation
1
1 4.5 Integers
1 ============
1
1 * 'Any extended integer types that exist in the implementation (C99
1 and C11 6.2.5).'
1
1 GCC does not support any extended integer types.
1
1 * 'Whether signed integer types are represented using sign and
1 magnitude, two's complement, or one's complement, and whether the
1 extraordinary value is a trap representation or an ordinary value
1 (C99 and C11 6.2.6.2).'
1
1 GCC supports only two's complement integer types, and all bit
1 patterns are ordinary values.
1
1 * 'The rank of any extended integer type relative to another extended
1 integer type with the same precision (C99 and C11 6.3.1.1).'
1
1 GCC does not support any extended integer types.
1
1 * 'The result of, or the signal raised by, converting an integer to a
1 signed integer type when the value cannot be represented in an
1 object of that type (C90 6.2.1.2, C99 and C11 6.3.1.3).'
1
1 For conversion to a type of width N, the value is reduced modulo
1 2^N to be within range of the type; no signal is raised.
1
1 * 'The results of some bitwise operations on signed integers (C90
1 6.3, C99 and C11 6.5).'
1
1 Bitwise operators act on the representation of the value including
1 both the sign and value bits, where the sign bit is considered
1 immediately above the highest-value value bit. Signed '>>' acts on
1 negative numbers by sign extension.
1
1 As an extension to the C language, GCC does not use the latitude
1 given in C99 and C11 only to treat certain aspects of signed '<<'
1 as undefined. However, '-fsanitize=shift' (and
1 '-fsanitize=undefined') will diagnose such cases. They are also
1 diagnosed where constant expressions are required.
1
1 * 'The sign of the remainder on integer division (C90 6.3.5).'
1
1 GCC always follows the C99 and C11 requirement that the result of
1 division is truncated towards zero.
1