04.01.2015 Views

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Language Extensions<br />

3.3.2 long long<br />

The <strong>ARM</strong> compiler supports 64-bit integer types through the type specifiers long long<br />

and unsigned long long. They behave analogously to long and unsigned long with<br />

respect to the usual arithmetic conversions. __int64 is a synonym for long long.<br />

Integer constants can have:<br />

• an ll suffix to force the type of the constant to long long, if it fits, or to unsigned<br />

long long if it does not fit<br />

• a ull or llu suffix to force the type of the constant to unsigned long long.<br />

Format specifiers for printf() and scanf() can include ll to specify that the following<br />

conversion applies to a long long argument, as7 in %lld or %llu.<br />

Also, a plain integer constant is of type long long or unsigned long long if its value is<br />

large enough. There is a warning message from the compiler indicating the change. For<br />

example, in strict 1990 ISO Standard C 2147483648 has type unsigned long. In <strong>ARM</strong><br />

C and C++ it has the type long long. One consequence of this is the value of an<br />

expression such as:<br />

2147483648 > –1<br />

This expression evaluates to 0 in strict C and C++, and to 1 in <strong>ARM</strong> C and C++.<br />

The long long types are accommodated in the usual arithmetic conversions.<br />

See also<br />

• __int64 on page 4-10.<br />

3.3.3 restrict<br />

The restrict keyword is a C99 feature. It enables you to convey a declaration of intent<br />

to the compiler that different pointers and function parameter arrays do not point to<br />

overlapping regions of memory at runtime. This enables the compiler to perform<br />

optimizations that can otherwise be prevented because of possible aliasing.<br />

Usage<br />

The keywords __restrict and __restrict__ are supported as synonyms for restrict and<br />

are always available.<br />

You can specify --restrict to allow the use of the restrict keyword in C90 or C++.<br />

3-8 Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. <strong>ARM</strong> DUI 0348C<br />

Non-Confidential,<br />

ID101213

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!