HP aC++/HP C A.06.20 Programmer's Guide
Table 2-2 Size and Alignment of HP Compiler Data Types (continued)
AlignmentSize (in bytes)Data Type
44
wchar_t
22
short, unsigned short,
signed short
44
int, unsigned int
4*4*
long, unsigned long
44
float
1616
__float80
8**16
__float128
44
_Decimal32
88
_Decimal64
1616
_Decimal128
88
double
8**16
long double
88
long long, unsigned long
long
44
enum
Alignment of array element typeSize of array element typearrays
1-, 2-, 4-, 8-, or 16-byte***
struct
1-, 2-, 4-, 8-, or 16-byte***
union
Alignment of declared typeSize of declared typebit-fields
4*4*pointer
* In 64-bit mode, long, unsigned long, and pointer data types are 8 bytes long and 8-byte aligned.
** In 64-bit mode, long double is 16-byte aligned.
*** struct and union alignment are same and follow strict alignment of any member. Padding is done
to a multiple of the alignment size.
-fshort-enums
cc -Agcc -Wc,--fshort-enums foo.c
aCC -Ag++ -Wc,--fshort-enums foo.c
The -fshort-enums option is used with the -Agcc or -Ag++ options to cause each
enum type to be represented using the smallest integer type that is capable of
Data Alignment and Storage 41