-qstrict
In z/OS® XL C/C++, -O3 implies -qnostrict, which enables many floating-point optimizations.
However, in Open XL C/C++ for z/OS,
-O3 does not enable most of the floating-point optimizations that z/OS XL
C/C++
enabled. To enable more floating-point optimizations in Open XL C/C++ for z/OS,
use the following steps:
- Specify -O3 to let the program produce expected results.
- Specify -Ofast to further optimize the program.
- If correctness issues arise when moving from -O3 to
-Ofast, selectively disable certain types of floating-point optimizations with
one or more of the following options to achieve the balance between accuracy and speed.
- -f[no-]honor-infinities
- -f[no-]honor-nans
- -f[no-]math-errno
- -f[no-]finite-math-only
- -f[no-]associative-math
- -f[no-]reciprocal-math
- -f[no-]signed-zeros
- -f[no-]trapping-math
- -ffp-contract
- -f[no-]rounding-math