Description
The #pragma options directive specifies compiler options for your source program.
Syntax
The following are valid options for #pragma options:
| Valid options | Description |
| align=option | equivalent to option gen(align,option). |
| [no]ansialias | equivalent to option opt(alias,ansi). |
| arch=option | equivalent to option gen(arch,option). |
| assert=option | equivalent to option opt(alias,option). |
| chars=option | equivalent to #pragma chars. |
| [no]check | equivalent to option gen(check,zerodivide). |
| [no]compact | equivalent to option opt(size). |
| enum=option | equivalent to #pragma enum. |
| flag=option | Specify the
severity level of diagnostics to be reported. #pragma options flag=i ==> #pragma report (C++) (level,I) #pragma options flag=w ==> #pragma report (C++) (level,W) #pragma options flag=e,s,u ==> #pragma report (C++) (level,E) |
| flttrap=option | equivalent to option gen(floatTrap,option). |
| float=option | equivalent to option gen(float,option). |
| [no]fold | equivalent to option gen(float,fold). |
| [no]ignerrno | equivalent to option opt(ignerrno). |
| info=option | equivalent to #pragma info. |
| initauto=value | equivalent to option gen(initauto,value). |
| [no]inlglue | equivalent to option gen(inlinePointerGlue). |
| isolated_call=names | equivalent to #pragma isolated_call. |
| [no]libansi | equivalent to option gen(libansi). |
| [no]longlong | equivalent to option lang(longlong). |
| [no]maxmem=number | equivalent to option opt(maxmem,number). |
| equivalent to #pragma priority (C++). | |
| [no]ro | equivalent to option gen(readOnly). |
| [no]roconst | equivalent to option gen(readOnlyConst). |
| equivalent to option gen(vftReadOnly). | |
| spill=number | equivalent to option opt(registerSpillSize,number). |
| [no]strict | equivalent to option opt(strict). |
| tbtable=option | equivalent to option gen(traceBackTable,option). |
| tune=option | equivalent to option opt(tune,option). |
| [no]unroll unroll=number |
equivalent to option opt(loopUnroll). |
| equivalent to option gen(vft). |
The
following are valid options for #pragma options only in
C:
Valid options |
Description |
| [no]attr attr=full |
Produces an attribute listing containing all names. |
| [no]cinc=prefix | Specifies files to be included with implicit extern "C". |
| [no]dbcs | String literals and comments can contain DBCS characters. |
| [no]dbxextra | Generates symbol table information for unreferenced variables. |
| [no]digraph | Allows special digraph and keyword operators. |
| [no]dollar | equivalent to option lang(allowDollarInNames). |
| [no]extchk | Performs external name type-checking and function call checking. |
| [no]funcsect | Places intructions for each function in a separate cset. |
| [no]fullpath | Specifies the path information stored for files for dbx stabstrings. |
| genpcomp | Generates pre-compiled headers. |
| halt | Stops compiler when errors of the specified severity detected. |
| [no]idirfirst | Specifies search order for user include files. |
| langlvl | Specifies different language levels. |
| [no]ldbl128 | gen(longdouble) is a CodeStore wide option. |
| list | Produces an object listing. |
| [no]longdouble | gen(longdouble) is a CodeStore wide option. |
| [no]mbcs | String literals and comments can contain DBCS characters. |
| macpstr | Allows '\p' as the first character of a string constant. |
| once | Processes include file only once. |
| showinc | Includes the source of all included files in the listing. |
| som (C++) | Turns on implicit SOM mode. |
| somgs (C++) | Disables direct access to attributes for SOM objects. |
| source | Produces a source listing. |
| srcmsg | Reconstructs source lines in error along with the diagnostic messages. |
| nostdinc | The include directory is not searched. |
| [no]upconv | equivalent to option lang(preserveUnsignedPromotion). |
| xref | Produces a cross-reference listing. |
By default, the options specified apply to the entire source program. If you specify more than one compiler option, use a blank space to separate them.
If
certain options are to apply to the entire program, then the
#pragma options directive should be specified before any
statements.
Eight compiler options that can be specified with the #pragma options directive have corresponding preprocessor #pragma directives. They are:
| #pragma option Name | #pragma Name |
|---|---|
| chars | chars |
| enum | enum |
| flag | |
| info | info |
| isolated_call | isolated_call |
| langlvl | |
| priority | |
| ro | strings |
![]()
Preprocessor Directives - An
Overview
Preprocessor Directive -
#pragma
![]()
Build Options
AIX Optimization
Options
AIX Code Generation
Options
Optimization
Options
Code-generation
Options
