Keil™, An ARM® Company

RealView Compiler Reference Guide

Technical Support

On-Line Manuals

RealView Compiler Reference Guide

Preface
Introduction
Compiler Command-line Options
Language Extensions
Preprocessor extensions
#assert
#include_next
#unassert
#warning
C99 language features available in C90
// comments
Subscripting struct
Flexible array members
C99 language features available in C++ and C90
Variadic macros
long long
restrict
Hex floats
Standard C language extensions
Constant expressions
Array and pointer extensions
Block scope function declarations
Dollar signs in identifiers
Top‑level declarations
Benign redeclarations
External entities
Function prototypes
Standard C++ language extensions
? operator
Declaration of a class member
friend
Read/write constants
Scalar type constants
Type conversions
Standard C and standard C++ language extensions
Address of a register variable
Arguments to functions
Anonymous classes, structures and unions
Assembler labels
Empty declaration
Hexadecimal floating‑point constants
Incomplete enums
Integral type extensions
Label definitions
Long float
Non static local variables
Structure, union, enum, and bitfield extensions
GNU language extensions
Alternate keywords
asm keyword
Case ranges
Cast of a union
Character escape sequences
Compound literals
Designated inits
Conditionals
Initializers
Inline
Extended lvalues
Pointer arithmetic
Statement expressions
Unnamed fields
Compiler-specific Features
C and C++ Implementation Details
Via File Syntax
Standard C Implementation Definition
Standard C++ Implementation Definition
C and C++ Compiler Implementation Limits

long long

3.3.2. 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.

See also

Copyright © 2007 ARM Limited. All rights reserved.ARM DUI 0376A