floatTrap Code Generation Option (AIX)

Syntax: Default:
gen(floatTrap, option[, yes])
gen(floatTtrap, option, no)
gen(floatTrap, overflow, no)
gen(floatTrap, underflow, no)
gen(floatTrap, zerodivide, no)
gen(floatTrap, invalidOperation, no)
gen(floatTrap, inexact, no)
gen(floatTrap, enable, no)
gen(floatTrap, imprecise, no)

This option specifies whether to generate instructions to detect and trap floating-point exceptions. 

By default, floating-point exceptions are not detected and trapped.

The following table describes the effect of specifying gen(floatTrap, option) for each of the floatTrap suboptions.

Option Effect
overflow Generates code to detect and trap floating-point overflow exceptions.
underflow Generates code to detect and trap floating-point underflow exceptions.
zerodivide Generates code to detect and trap floating-point division by zero exceptions.
invalidOperation Generates code to detect and trap floating-point invalid operation exceptions.
inexact Generates code to detect and trap floating-point inexact exceptions.
imprecise Generates code for imprecise detection of the specified exceptions.   If an exception occurs, it is detected, but the exact location of the exception is not determined.
enable Enables the specified exceptions in the prologue of the main program. This suboption is required if you want to turn on exception trapping without modifying the source code.

If your program contains signaling NaNs, you should use the gen(float, nans) option along with the gen floatTrap options to trap any exceptions. 

You can also specify floating-point exception trapping options from your C and C++ source code by using #pragma options flttrap=option.   The pragma overrides the configuration file option.



Incremental C++ Build
C Compilation
Configuration Files


Set Build Options
Build


Code Generation Options
Code Generation Options