Option Type | Default Value | #pragma options | C | C++ |
-qoption | noldbl128 | LDBL128 | x | x |
Syntax
-qldbl128 | -qnoldbl128 | -qlongdouble | -qnolongdouble LDBL128 | NOLDBL128 | LONGDOUBLE | NOLONGDOUBLE
Purpose
Increases the size of long double type from
64 bits to 128 bits.
Notes
The -qlongdouble option is the same as the -qldbl128 option.
Separate libraries are provided that support 128-bit long double types. These libraries will be automatically linked if you use any of the invocation commands with the 128 suffix (xlC128, xlc128 or cc128). You can also manually link to the 128-bit versions of the libraries using the -lkey option, as shown in the following table:
Default (64-bit) long double | 128-bit long double | ||
---|---|---|---|
Library | Form of the -lkey option | Library | Form of the -lkey option |
libC.a | N/A | libC128.a | N/A |
libCns.a | -lCns | libC128ns.a | -lC128ns |
libcomplex.a | -lcomplex | libcomplex128.a | -lcomplex128 |
Linking without the 128-bit versions of the libraries when your program uses 128-bit long doubles (for example, if you specify -qldbl128 alone) may produce unpredictable results.
The -qldbl128 option defines __LONGDOUBLE128.
The #pragma options directive must appear before the first C or C++ statement in the source file, and the option applies to the entire file.
Example
To compile myprogram.c so that long double
types are 128 bits, enter:
xlC myprogram.c -qldbl128 -lC128
or:
xlC128 myprogram.c
For a description of the 128-bit long double, refer to Floating-Point Types (F.3.6).
List of Compiler Options and Their
Defaults
Options that Define the Compiler Object
Code Produced