Specifying z/OS XL C compiler options using #pragma options

You can use the #pragma options preprocessor directive to override the default values for compiler options. The exception is LONGNAME | NOLONGNAME, where the compiler options override the #pragma preprocessor directives. Compiler options that are specified on the command line or in the CPARM parameter of the IBM-supplied cataloged procedures can override compiler options that are used in #pragma options. The exception is CSECT, where the #pragma csect directive takes precedence. For complete details on the #pragma options preprocessor directive, see z/OS XL C/C++ Language Reference.

The #pragma options preprocessor directive must appear before the first z/OS® XL C statement in your input source file. Only comments and other preprocessor directives can precede the #pragma options directive. Only the options that are listed below can be specified in a #pragma options directive. If you specify a compiler option that is not in the following list, the compiler generates a warning message, and does not use the option.
AGGREGATE ALIAS
ANSIALIAS ARCHITECTURE
CHECKOUT GONUMBER
IGNERRNO INLINE
LIBANSI MAXMEM
OBJECT OPTIMIZE
RENT SERVICE
SPILL START
TEST TUNE
UPCONV XREF
Notes:
  1. When you specify conflicting attributes explicitly, or implicitly by the specification of other options, the last explicit option is accepted. The compiler usually does not issue a diagnostic message indicating that it is overriding any options.
  2. When you compile your program with the SOURCE compiler option, an options list in the listing indicates the options in effect at invocation. The values in the list are the options that are specified on the command line, or the default options that were specified at installation. These values do not reflect options that are specified in the #pragma options directive.