PORT | NOPORT (C++ only)
Category
Portability and migration
Pragma equivalent
None.
Purpose
Adjusts the error recovery action that the compiler takes when it encounters an ill-formed #pragma pack directive.
When the PORT compiler option is in effect, the compiler uses the specified error recovery mode.
When the NOPORT compiler option is in effect, the compiler uses the default error recovery mode.
Syntax
Defaults
NOPORT
Parameters
- PPS
- When you specify PORT(PPS), the compiler uses the strict error recovery mode.
- NOPPS
- When you specify PORT(NOPPS), the compiler uses the default error recovery mode.
Usage
When you specify PORT without a suboption, the suboption setting is inherited from the default setting or from previous PORT specifications.
- #pragma pack (first_value)
- If first_value is a valid suboption for #pragma pack, packing is done as specified by first_value. The compiler detects the missing closing parentheses and issues a warning message.
- If first_value is not a valid suboption for #pragma pack, no packing changes are made. The compiler ignores the #pragma pack directive and issues a warning message.
- #pragma pack (first_value bad_tokens)
- If first_value is a valid suboption for #pragma pack, packing is done as specified by first_value. If bad_tokens is invalid, the compiler detects it and issues a warning message.
- If first_value is not a valid suboption for #pragma pack, no packing changes will be performed. The compiler will ignore the #pragma pack directive and issue a warning message.
- #pragma pack (valid_value) extra_trailing_tokens
The compiler ignores the extra text and issues an information message.
To use the strict error recovery mode of the compiler, you must explicitly request it by specifying PORT(PPS).
When the strict error recovery mode is active, and the compiler detects errors in the #pragma pack directive, it ignores the pragma and does not make any packing changes.
#pragma pack(first_value)
#pragma pack(first_value bad_tokens)
#pragma pack(valid_value) extra_trailing_tokens
See z/OS XL C/C++ Language Reference for more information on #pragma pack.
IPA effects
The IPA link step issues a diagnostic message if you specify the PORT option for that step.
Predefined macros
None.