| |||
| Home > Language Extensions > C99 language features available in C++ and C90 > long long | |||
The ARM compiler supports 64-bit integer types through the
type specifiers long long and unsigned long long.
They behave analogously to long and unsigned
long with respect to the usual arithmetic conversions. __int64 is
a synonym for long long.
Integer constants can have:
an ll suffix
to force the type of the constant to long long, if
it fits, or to unsigned long long if it does not fit
a ull or llu suffix
to force the type of the constant to unsigned long long.
Format
specifiers for printf() and scanf() can
include ll to specify that the following conversion
applies to a long long argument, as7 in %lld or %llu.
Also, a plain integer constant is of type long long or unsigned long long if its value is large enough. There is a warning message from the compiler indicating the change. For example, in strict 1990 ISO Standard C 2147483648 has type unsigned long. In ARM C and C++ it has the type long long. One consequence of this is the value of an expression such as:
2147483648 > -1
This expression evaluates to 0 in strict C and C++, and to 1 in ARM C and C++.
The long long types are accommodated in the usual arithmetic conversions.