-qdfp
Category
Pragma equivalent
None.
Purpose
Enables compiler support for decimal floating-point types and literals.
Defaults
-qnodfp
Usage
If you enable -qdfp for a -qarch value that does not support decimal floating-point instructions, -qfloat=dfpemulate is automatically enabled, and the decimal floating-point operations are performed by software. This may cause a slowdown in the application's runtime performance.
Note: To use decimal floating-point
types and literals, you must also enable specific code in header files
by defining the __STDC_WANT_DEC_FP__ macro at compile time. See Examples.
Predefined macros
When -qdfp is in effect, __IBM_DFP__ is predefined to a value of 1; otherwise it is undefined.
Examples
To
compile myprogram.c that contains
decimal floating-point type and literal, enter:
xlc myprogram.c -qarch=pwr7 -qdfp -D__STDC_WANT_DEC_FP__