C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

In this mode, all bitfields are packed into ints defined by their base type. The compiler accepts
any integer type for a bitfield. This provides compatibility with how some other compilers pack
bitfields. To see how the use of all can change the packing of a structure, consider this struct:
struct {
short int a : 10;
short int b : 10;
short int c : 10;
} s;
With int or long containers, the compiler tries to pack the bitfields into 32-bit ints. Hence, all
three bitfields fit into one 32-bit int, the size of the struct is 4 bytes.
With all containers, the bitfields are packed into 16-bit (the size of a short int) containers. The
first bitfield fits into the first 16-bit int, but the second one does not, and requires a second 16-bit
int to hold it. Likewise, the third bitfield requires a third 16-bit int to hold it. So, the size of this
struct is 6 bytes.
Usage Guidelines
The default value of the BITFIELD_CONTAINER option is int except when -Wlp64 option
is specified in which case, the default is long.
This command-line directive is only supported in TNS/E compilers running on H06.24/J06.13
RVU and later.
BITFIELD_CONTAINER is a command-line directive that must be entered on the compiler
RUN command-line, not in the source text.
NOTE: The specified rules, apply to bitfields declared in AUTO or PLATFORM (default) structs.
Any bitfield declared in a SHARED2 struct continues to follow the SHARED2 rules. Also, bitfields
in SHARED2 structs cannot be larger than 32-bit. Bitfields declared in SHARED8 structs
can be larger than 32-bits (if the BITFIELD_CONTAINER is long or all). The compiler returns
a warning in this case. Bitfields in SHARED8 structs are packed, but the bitfields larger than
32-bits are packed into 64-bit containers.
BUILD_NEUTRAL_LIBRARY
The BUILD_NEUTRAL_LIBRARY pragma is a command-line directive and directs the native
compilers to create a C++ library using only those components common to the VERSION2 and
VERSION3 standard libraries and to set the CPPNEUTRAL flag in the linkfile. This pragma allows
you to create a dynamic-link library that does not have a dependency on a specific version of the
C++ libraries.
BUILD_NEUTRAL_LIBRARY
The pragma default settings are:
SYSTYPE OSSSYSTYPE GUARDIAN
N.A.N.A.TNS C compiler
N.A.N.A.G-series TNS c89 utility
N.A.N.A.TNS/R native C and C++ compilers
G-series: N.A. H-series and J-series: not
set
G-series: N.A. H-series and J-series:
not set
Native c89 and c99 utilities
Not setNot setTNS/E native C and C++ compilers
BUILD_NEUTRAL_LIBRARY 175