Specifying compiler options

You can override your installation default options when you compile your z/OS® XL C/C++ program, by specifying an option in one of the following ways:
  • In the option list when you invoke the IBM-supplied REXX EXECs.
  • In the CPARM parameter of the IBM-supplied cataloged procedures, when you are compiling under z/OS batch.

    See Compiling, and Cataloged procedures and REXX EXECs for details.

  • In your own JCL procedure, by passing a parameter string to the compiler.
  • In an options file. See OPTFILE | NOOPTFILE for details.
  • For z/OS XL C, in a #pragma options preprocessor directive within your source file. See Specifying z/OS XL C compiler options using #pragma options for details.

    Compiler options that you specify on the command line or in the CPARM parameter of 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.

  • On the command line of the c89 utility, by using the -Wc, -WI, and -Wl,I options to pass options to the compiler.
  • On the command line of the xlc utility, by using the -q option or the -Wc and -Wl,I options to pass options to the compiler.

The following compiler options are inserted in your object module to indicate their status: