HP C Programmer's Guide (92434-90009)

38 Chapter2
Storage and Alignment Comparisons
Aligning Structures Between Architectures
Cross-Reference> are aligned in memory when using CCS/C on the HP 1000 or HP 3000:
Figure 2-11. Storage with CCS/C
NOTE
All data types and structures are 2-byte aligned when using CCS/C on the HP
1000 or HP 3000.
Table on page 39 shows the padding for the example code fragment:
Table 2-6. Padding with CCS/C
Padding
Location
Reason for Padding
a+1 Aligns the structure on a 2-byte boundary.
a+5 Aligns the short z on a 2-byte boundary.
a+13 Fills out the struct x to a 2-byte boundary. (Aligns the character on a 2-byte
boundary.)
a+17 Aligns the short z on a 2-byte boundary.