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

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-30
FIELDALIGN
CSHARED2
directs the TNS C, native C, and native C++ compilers to lay out components
using the TNS C compiler AUTO alignment rules. Substructures and derived
classes with AUTO alignment and pointers with platform-dependent sizes are
not allowed when CSHARED2 is specified.
SHARED2
directs the TNS C, native C, and native C++ compilers to lay out components
using the default TAL compiler SHARED2 alignment rules.
SHARED8
directs the TNS C, native C, and native C++ compilers to lay out components
using the pTAL compiler SHARED8 alignment rules.
PLATFORM
directs the TNS C compiler to lay out components using the SHARED2
alignment rules, and directs the native C and C++ compilers to lay out
components using the AUTO alignment rules.
tag-name
specifies the name of a structure to which the given alignment rules apply. If no tag
is specified, the FIELDALIGN pragma applies the structure allocation scheme to
all structures in the compilation unit.
The pragma default settings are:
While the TNS compilers and the native compilers default to AUTO, the AUTO alignment
rules are not the same for the TNS, TNS/R, and TNS/E native compilers.
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler FIELDALIGN AUTO FIELDALIGN AUTO
G-series TNS c89 utility FIELDALIGN AUTO FIELDALIGN AUTO
TNS/R native C and C++ compilers FIELDALIGN AUTO FIELDALIGN AUTO
Native c89 utility FIELDALIGN AUTO FIELDALIGN AUTO
TNS/E native C and C++ compilers FIELDALIGN AUTO FIELDALIGN AUTO