Language Implementation
7-3
7
Table 7-1 Scalar Data Types (continued)
Data Type
Size
(bytes) Format
bit field
1
(signed value)
1 to 32
bits
2's complement integer
of bits in the bit field.)
pointer 4 address
enum
2
1, 2, or 4 2's complement integer
or ordinal
1
Bit fields occupy as many bits as you assign them, up to a word (4 bytes), and their length need not
be a multiple of 8 bits (1 byte).
2
The enum data type is identical in size and range to char, short, or int data type, depending on the
range of constants in the enum declaration.
Compiler options (e.g., gcc960’s f[no-]signed-char or
f[no-]unsigned-char; ic960’s Gcs or Gcu) set the char declaration
default to
signed char or unsigned char. Wide characters (character
constants prefixed with an
L) are syntactically supported but semantically
identical to other character constants. Note that with gcc960
char defaults
to
unsigned, whereas ic960 defaults to unsigned.
The approximate ranges of
float, double, and long double data types
appear in Table 7-1.
NOTE. The compiler does not support the 64-bit long-ordinal and long-
integer data types available for the assembler and the i960 architecture.
On architectures with an internal floating-point unit (80960KB/SB), the
compiler uses 32-bit and 64-bit general registers for intermediate results
when performing calculations with
float and double data types.
Therefore, the accuracy of these data types is limited to 32 bits and 64
bits, respectively. The compiler does use the internal floating-point
registers (
fp0-fp3) when performing calculations with long double data
types, yielding IEEE-754 accuracies at the expense of execution speed
and code size.