Data Definition Language (DDL) Reference Manual (G06.24+)
DDL Compiler Commands
Data Definition Language (DDL) Reference Manual—426798-002
9-15
CFIELDALIGN_MATCHED2 Command
•
To suppress the #pragma fieldalign matched2 statements, set the NOCPRAGMA
command.
•
When compiling a definition or record with matched2 alignment, all referenced
definitions must have been compiled with matched2 alignment; otherwise, DDL
returns an error.
For more information about alignment rules, see Appendix H, DDL Alignment Rules.
CFIELDALIGN_MATCHED2 Examples
The following example shows the storage alignment for structure s1:
struct s1
{
struct
{
char c[3];
} ss2;
char y;
} s1;
With CFIELDALIGN_MATCHED2 set, members of the structure can start on odd byte
boundaries:
With C00CALIGN set, all structures and nested substructures must begin and end on
an even byte boundary:
The next example shows storage alignment for structure s3, with a single character
defined before the nested structure:
struct s3
{
char x;
struct
{
char c[3];
} ss4;
char y;
} s3;
c[0] c[1]
c[2] y
c[0] c[1]
c[2] filler
y filler
x filler