HP aC++/HP C A.06.28 Programmer's Guide Integrity servers (769150-001, March 2014)

The following command compiles prog.C to assembly code rather than to object code, and puts
the assembly code in the file prog.s.
aCC -S prog.C
Data Alignment and Storage
This section describes default data storage allocation and alignment for HP compiler data types.
Data storage refers to the size of data types, such as bool, short, int, float, and char*.
Data alignment refers to the way the HP compiler aligns data structures in memory. Data type
alignment and storage differences can cause problems when moving data between systems that
have different alignment and storage schemes. These differences become apparent when a structure
is exchanged between systems using files or inter-process communication. In addition, misaligned
data addresses can cause bus errors when an attempt is made to dereference the address.
For information on unaligned data access, See “Handling Unaligned Data” (page 101).
Table 3 lists the size and alignment of the HP compiler data types:
Table 3 Size and Alignment of HP Compiler Data Types
AlignmentSize (in bytes)Data Type
1-byte1bool
11char, unsigned char, signed
char
44wchar_t
22short, unsigned short, signed
short
44int, unsigned int
4*4*long, unsigned long
44float
1616__float80
8**16__float128
44_Decimal32
88_Decimal64
1616_Decimal128
88double
8**16long double
88long long, unsigned long long
44enum
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.
34 Command-Line Options