H-Series Application Migration Guide (H06.03+)
Native C and C++ Migration Tasks
H-Series Application Migration Guide—429855-006
5-12
Pragmas
Pragmas
The native TNS/E C and C++ compilers support these new pragmas:
Maximum Data Alignment
Certain functions on H-series systems require that data be aligned to 16-byte
boundaries. To enable C and C++ programs to use these functions, a new pragma,
MAXALIGN, is defined. The MAXALIGN pragma specifies that objects of a composite
type are given the maximum alignment supported by the compiler. On H-series
systems, the maximum alignment is 16 bytes. MAXALIGN is required in certain cases;
for example, when allocating a register save area that will be directly used by the
hardware.
Most programs will not need to declare the MAXALIGN pragma, as it is included in the
standard header file that supplies the data type declaration.
64-Bit Data Type and String Conversion Functions
The TNS/E native C and C++ compilers provide a 64-bit unsigned integer data type.
The type declaration is unsigned long long. The following new functions are provided for
conversion between character strings and the 64-bit integer type:
Pragma Description
NEUTRAL Marks an object as sharable between VERSION2 and
VERSION3 of the C++ standard library. See Native C and
C++ Run-Time Library and Tools.h++ Migration Issues on
page 5-7 for more information.
MAXALIGN Aligns composite objects to the maximum alignment (16-
byte alignment). See Maximum Data Alignment
on
page 5-12 for more information.
Function Description
strtoll Converts a character string to a signed long long integer
strtoull Converts a character string to an unsigned long long integer
wcstoll Converts a wide-character string to a signed long long integer
wcstoull Converts a wide-character string to an unsigned long long integer