Why does clang say _Imaginary_I is not declared?

Viewed 517

Running

clang test.c -o test

On this file

#include <stdio.h>
#include <complex.h>

int main()
{
    _Complex double z = 1.0 + _Imaginary_I * 2.0;
    return 0;
}

fails to compile because of

error: use of undeclared identifier '_Imaginary_I'.

According to onlinepubs, _Imaginary_I is defined. What happened?

1 Answers
Related