ARM VERSION 1.2 Fiche technique Page 73

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 276
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 72
ARM Compiler Reference
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. 3-17
Identifiers
The
$
character is a legal character in identifiers.
Void returns and arguments
Any
void
type, including a typedef to
void
, is permitted as the return type in a function
declaration, or the indicator that a function takes no argument. For example, the
following is permitted:
typedef void VOID;
int fn(VOID); // Error in -strict C and C++
VOID fn(int x); // Error in -strict C
long long
ARM C and C++ compilers support 64-bit integer types through the type specifier
long
long
and
unsigned long long
. They behave analogously to
long
and
unsigned long
with
respect to the usual arithmetic conversions.
long long
is a synonym for
__int64
.
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
•an
llu
(or
ull
) 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, as 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 ANSI 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
is 0 in strict C and C++, and 1 in ARM C and C++.
The following restrictions apply to
long long
:
long long
enumerators are not available.
The controlling expression of a
switch
statement cannot have (
unsigned
)
long
long
type. Consequently case labels must also have values that can be contained
in a variable of type
unsigned
long
.
Vue de la page 72
1 2 ... 68 69 70 71 72 73 74 75 76 77 78 ... 275 276

Commentaires sur ces manuels

Pas de commentaire