-qldbl128, -qlongdouble
Category
Pragma equivalent
#pragma options [no]ldbl128
Purpose
Increases the size of long double types from 64 bits to 128 bits.
Syntax
.-nolongdouble-. +-noldbl128----+ >>- -q--+-ldbl128------+--------------------------------------->< '-longdouble---'
Defaults
-qnoldbl128
Usage
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 (xlc++128, xlc128, cc128, xlc++128_r, xlc128_r, or cc128_r). 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 | -lC | libC128.a | -lC128 |
| libC_r.a | -lC_r | libC128_r.a | -lC128_r |
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 #pragma options directive must appear before the first C or C++ statement in the source file, and the option applies to the entire file.
Predefined macros
- __LONGDOUBLE128 is defined to 1 when -qldbl128 is in effect; otherwise, it is undefined.
- __LONGDOUBLE64 is defined to 1 when -qnoldbl128 is in effect; it is undefined when -qldbl128 is in effect.
Examples
xlc myprogram.c -qldbl128 -lC128



