C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)
Usage Guidelines
• This pragma is only supported in TNS/E compilers.
• This pragma applies only to definitions of a composite type. For C, composite types include
array types, struct types, and union types. For C++, composite types also include classes.
• You do not need to specify this pragma if it appears in the standard header file that supplies
the data type declaration.
• The size of the type is padded at the end if necessary to make the size an integral multiple of
its alignment.
• For the TNS/E compiler, the maximum alignment supported is 16 bytes.
Examples
1. #pragma MaxAlign
typedef double jmp_buf[160]; // Aligned at 16 bytes
// instead of 8 bytes
2. #pragma MaxAlign
struct s {
int I;
int J;
}; // Aligned at 16 bytes, with size 16 bytes and
// 8 bytes of padding at the end
MIGRATION_CHECK
The MIGRATION_CHECK pragma directs the TNS/R native C++ compiler to perform a migration
check, to aid in migrating from VERSION2 of the Standard C++ Library to VERSION3.
MIGRATION_CHECK
The pragma default settings are:
SYSTYPE OSSSYSTYPE GUARDIAN
Not setNot setTNS C compiler
Not setNot setG-series TNS c89 utility
Not setNot setTNS/R native C and C++ compilers
Not setNot setNative c89 utility
N.A.N.A.c99 utility
Not setNot setTNS/E native C and C++ compilers
Usage Guidelines
• On Guardian environment, the MIGRATION_CHECK pragma must be entered on the NMCPLUS
or CPPCOMP command line along with the VERSION2 directive. On OSS environment or
Windows, specify the -Wmigration_check option of the c89 utility along with -Wversion2.
• Running a migration check does:
Analyses VERSION2 source code using the compiler and header files provided beginning
with G06.20
◦
◦ Issues a warning when a class or member function is used that has changed or become
obsolete for VERSION3
MIGRATION_CHECK 217