Using the GNU Compiler Collection (GCC): Integers implementation |
---|
Next: Floating point implementation, Previous: Characters implementation, Up: C Implementation [Contents][Index]
GCC does not support any extended integer types.
GCC supports only two’s complement integer types, and all bit patterns are ordinary values.
GCC does not support any extended integer types.
For conversion to a type of width N, the value is reduced modulo 2^N to be within range of the type; no signal is raised.
Bitwise operators act on the representation of the value including both the sign and value bits, where the sign bit is considered immediately above the highest-value value bit. Signed ‘>>’ acts on negative numbers by sign extension.
As an extension to the C language, GCC does not use the latitude given in C99 and C11 only to treat certain aspects of signed ‘<<’ as undefined. However, -fsanitize=shift (and -fsanitize=undefined) will diagnose such cases. They are also diagnosed where constant expressions are required.
GCC always follows the C99 and C11 requirement that the result of division is truncated towards zero.
Next: Floating point implementation, Previous: Characters implementation, Up: C Implementation [Contents][Index]