This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Warning: imaginary constants are a GNU extension

Hello everyone,

I'm developing a code that involves complex number (complex.h).
In every line that has the imaginary I, such as:

Fullscreen
1
float complex sum = 0.0 + 0.0*I;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

or

Fullscreen
1
noise[j][i] = conjf(eigen_vec[i][k] + eigen_vec[i+m-1][k]*I);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Keil gives that warning: " imaginary constants are a GNU extension".

In the complex.h has:

Fullscreen
1
define I _Complex_I
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Why is it giving that warning?
Is my code going to work properly?
How can I solve that warning?

Thanks in advanced.

0