HP C A.06.05 Reference Manual

HP C/HP-UX Implementation Topics
Data Types
Chapter 10236
Data Types
Data types are implemented in HP C/HP-UX as follows:
The char type is signed.
All types can have the register storage class, although it is only honored for scalar types.
Ten register declarations per function are honored.
The signed integer types are represented internally using twos complement form.
Structures and unions start and end on an alignment boundary which is that of their most
restrictive member.
The long long data type cannot be used to declare an array's size.
The long long data type is available only under -Ac, -Aa +e, and -Ae compilation modes.
Table 10-1 lists the sizes and ranges of different HP C/HP-UX data types.
Table 10-1 HP C/HP-UX Data Types
Type Bits Bytes Low Bound
High
Bound Comments
char 8 1 -128 127 Character
signed char 8 1 -128 127 Signed
integer
unsigned char 8 1 0 255 Unsigned
integer
short 16 2 -32,768 32,767 Signed
integer
unsigned short 16 2 0 65,535 Unsigned
integer
int 32 4 -2,147,483,6
48
2,147,483,64
7
Signed
integer
unsigned int 32 4 0 4,294,967,29
5
Unsigned
integer