Installation guide

No additional padding (beyond 4 bytes of tail padding) is necessary because
CountedString will naturally align on a quadword boundary.
struct {
char *text;
int count;
}CountedString;
In the following example, the inclusion of CountedString as a member in
the definition forces the alignment of the beginning of the structure to be
on a quadword boundary. Additional padding might be introduced
(depending upon the value of MAX_LINE) to ensure proper quadword
alignment for the structure member, string. Additional padding might
also be introduced at the end of the structure, to ensure proper structure
alignment for arrays of these structures.
CountedString CsArray[10]
struct {
char line[MAX_LINE];
struct CountedString string;
}TextAndString;
In the following example, the structure has a size of 24 bytes:
struct s{
int count;
struct s *next;
int total;
}
If this structure is reordered, the structure now has a size of 16 bytes.:
struct s{
struct s *next;
int count;
int total;
}
7.3.3.4 Bit Fields
Bit fields are allowed on any integral type on Alpha systems. (ANSI C only
requires bit fields with int, signed int, and unsigned int types.) In a C
declaration, if one bit field immediately follows another in a structure
declaration, the second bit field will be packed into adjacent bits of the
former unit. Since long is 64 bits in length on Alpha systems, adjacent
declarations of bit fields of type long might contain multiple bit field
definitions in cases that previously did not on RISC or VAX systems. This
change might cause different results in operations on these bit fields.
To ensure the same behavior in operations on bit fields, change bit field
definitions of type long to int.
Migrating Your ULTRIX Application to a DIGITAL UNIX System 7–15