DDL Compiler Commands
Data Definition Language (DDL) Reference Manual — 426798-002
9- 14
CFIELDALIGN_MATCHED2 Command
CFIELDALIGN_MATCHED2 Command Guidelines
The following points are guidelines when using the CFIELDALIGN_MATCHED2
command:
•
The CFIELDALIGN_MATCHED2 command allows members of a structure to be
assigned a byte or word address consecutively. If the remaining byte in a two-byte
word is not large enough for the next member, then DDL assigns the next word
aligned address. This guideline also applies to substructures that are declared
inline, using the first member of the substructure.
•
DDL word-aligns substructures that refer to other group definitions, and makes
their length even.
•
An item following a referenced
struct
must be word aligned. If the referenced
struct has an odd byte length, DDL adds a filler to the dictionary after the reference
to the struct.
•
DDL word-aligns substructures declared by template with a
typedef
or structure
tag. DDL adds a filler if needed to word align a referenced definition.
•
The C source code for a struct generated with CFIELDALIGN_MATCHED2 set is
preceded by the following statement:
#pragma fieldalign shared2 __struct-name
where __
struct-name
is the name of the struct.
•
When generating C source with matched2 alignment, DDL allows substructures to
start on an odd-byte boundary. Without matched2 alignment, C substructures must
start on a word boundary.
•
The DDL source code for a definition or record compiled with matched2 alignment
is preceded by the compiler command ?CFIELDALIGN_MATCHED2.
•
Pascal does not support the ?CFIELDALIGN_MATCHED2 command.
•
The C00CALIGN and CFIELDALIGN_MATCHED2 commands cannot be in effect
at the same time. DDL uses the value of the last command that was specified
(C00CALIGN, NOC00CALIGN, or CFIELDALIGN_MATCHED2). C00CALIGN is
the default setting.
•
To reset the CFIELDALIGN_MATCHED2 command, specify one of the following:
°
The C00CALIGN command, which generates default C output.
°
The NOC00CALIGN command, which does not generate C output for certain
structures. For more information, see
C00CALIGN Command
on page 9-11.
•
When you set CFIELDALIGN_MATCHED2, DDL ignores any FILLER specification.
Instead, DDL uses an extended FILLER 1 algorithm, adding fillers as described
previously. For more information about FILLER 1, see
FILLER Command
on
page 9-59.