| Syntax: | Default: |
| gen(check,option[,
yes]) gen(check,option, no) |
gen(check,bounds, no) gen(check,nullpointer, no) gen(check,zerodivide, no) |
This option generates code that performs certain types of run-time checking. If a violation is encountered, a run-time exception is raised by sending a SIGTRAP signal to the process.
The following can be specified for option:
| bounds | Performs run-time checking of addresses when subscripting within an object of known size. The index is checked to ensure that it will result in an address that lies within the bounds of the object's storage. A trap will occur if the address does not lie within the bounds of the object's storage. |
| nullpointer | Performs run-time checking of addresses that are contained in pointer variables used to reference storage. The address is checked at the point of use; a trap will occur if the value is less than 512. |
| zerodivide | Performs run-time checking of integer division. A trap will occur if an attempt is made to divide by zero. |
You can specify gen(check) more than once. The option
settings are accumulated, but the later option
settings override the earlier ones. For example, if you specify:
gen(check,bounds,yes)
gen(check,nullpointer,yes)
and then specify
gen(check,bounds,no)
the options that take effect are gen(check,nullpointer,
yes) and gen(check,bounds,no).
The
#pragma options directive must be specified before the first
statement in the compilation unit.
The
#pragma options directive can be specified anywhere in the
source.
The gen(check) option affects the run-time performance of the applications. When checking is enabled, run-time checks are inserted into the application, which may result in slower execution.
![]()
Incremental C++ Builds
C Compilation
![]()
Code Generation Options
![]()
Code Generation Options
