When the C1X complex initialization feature is enabled, you can initialize C99 complex types with a value of the form x + yi, where x and y can be any floating point value, including Inf or NaN.
The C1X complex initialization feature can be enabled by
the -qlanglvl=extc1x group option.
The C1X complex initialization feature can be enabled by
the -qlanglvl=extended or -qlanglvl=extended0x group
option. You can also use the -qlanglvl=complexinit suboption
to enable this feature. When you specify the -qlanglvl=nocomplexinit option,
only the C1X form of complex initialization is disabled.
float complex CMPLXF( float x, float y );
double complex CMPLX( double x, double y );
long double complex CMPLXL( long double x, long double y );
To use the C language header file complex.h in
C++ programs, you must specify the -qlanglvl=c99complexheader or -qlanglvl=c99complex option.
// a.c
#include <stdio.h>
#include <complex.h>
double _Complex a = CMPLX(5.0, 1.0/0);
int main(void) {
double _Complex c = CMPLX(5.0, 1.0/0);
printf("Value: %e + %e * I\n", __real__(a), __imag__(a));
printf("Value: %e + %e * I\n", __real__(c), __imag__(c));
}
You can specify either of the following commands to compile this program:

xlc -qlanglvl=extc1x a.c


xlC -qlanglvl=c99complexheader a.c -+

Value: 5 + Inf * I
Value: 5 + Inf * I