Hello everyone,
I'm developing a code that involves complex number (complex.h).In every line that has the imaginary I, such as:
float complex sum = 0.0 + 0.0*I;
or
noise[j][i] = conjf(eigen_vec[i][k] + eigen_vec[i+m-1][k]*I);
Keil gives that warning: " imaginary constants are a GNU extension".
In the complex.h has:
define I _Complex_I
Why is it giving that warning?Is my code going to work properly?How can I solve that warning?Thanks in advanced.
I think that it is a compiler-defined macro, so it must be in the compiler's source-code. The compiler must be setting its value depending on the flags passed and the actual features it can support.
Edit: One can undefine that macro by #undef, but that does not mean that the imaginary support also becomes available. If that macro is defined, it is an indication that the selected flags either prevent the compiler from providing the imaginary type, or that the compiler has no support for that type at all.