6.9. Double-Word Integers
6.9 Double-Word Integers
ISO C99 supports data types for integers that are at least 64 bits wide, and as an extension GCC supports them in C90 mode and in C++. Simply write long long int
for a signed integer, or unsigned long long int
for an unsigned integer. To make an integer constant of type long long int
, add the suffix ‘LL
’ to the integer. To make an integer constant of type unsigned long
long int
, add the suffix ‘ULL
’ to the integer.
You can use these types in arithmetic like any other integer types. Addition, subtraction, and bitwise boolean operations on these types are open-coded on all types of machines. Multiplication is open-coded if the machine supports a fullword-to-doubleword widening multiply instruction. Division and shifts are open-coded only on machines that provide special support. The operations that are not open-coded use special librar