Am Dienstag, den 25.11.2014, 16:25 +0100 schrieb Szabolcs Nagy: > * Jens Gustedt [2014-11-25 15:49:39 +0100]: > > +#define __CMPLX(x, y, t) ((t)(x) + _Complex_I*(t)(y)) > > > > this is only correct if the compiler supports annex g kind of > imaginary type, otherwise it is incorrect for infinites even then it would only work by using _Imaginary_I, I think > _Complex_I*INFINITY == (0 + i)*(inf + i*0) == nan + i*inf > > so imaginary inf will turn into nan real part right (but I think it is more import to get initialization of normal complex constants going, than the border cases with INFINITY and NAN) to support this it seems that gcc provides __builtin_complex, so we could implement this subject to some case analysis according to __builtin_const etc. But since the doc for __builtin_complex explicitly mentions C11, this probably doesn't exist for older versions of gcc. I'll think of it and prepare a new version of this patch Thanks Jens -- :: INRIA Nancy Grand Est ::: AlGorille ::: ICube/ICPS ::: :: ::::::::::::::: office Strasbourg : +33 368854536 :: :: :::::::::::::::::::::: gsm France : +33 651400183 :: :: ::::::::::::::: gsm international : +49 15737185122 :: :: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::