On 22 August 2007 11:13, Andrew Pinski wrote: > On 8/21/07, tbp <[EMAIL PROTECTED]> wrote: >> # /usr/local/gcc-4.3-svn.old6/bin/g++ vecop.cc >> vecop.cc: In function 'T foo() [with T = float __vector__]': >> vecop.cc:13: instantiated from here >> vecop.cc:4: error: invalid operands of types 'float __vector__' and >> 'float __vector__' to binary 'operator|' >> vecop.cc:5: error: invalid operands of types 'float __vector__' and >> 'float __vector__' to binary 'operator&' >> vecop.cc:6: error: invalid operands of types 'float __vector__' and >> 'float __vector__' to binary 'operator^' >> >> Apparently it's still there as of right now, on x86-64 at least. I think >> this is not supposed to happen but i'm not sure, hence the mail. > > This is internally, float|float does not make sense so how can vector > float | vector float make sense (likewise for & and ^).
float InvSqrt (float x){ float xhalf = 0.5f*x; int i = *(int*)&x; i = 0x5f3759df - (i>>1); x = *(float*)&i; x = x*(1.5f - xhalf*x*x); return x; } It's not exactly what you're referring to, but it's evidence in favour of the argument that we should never presume anything, no matter how unusual, might not have a reasonable use. (However as I said, I'm not arguing against the error message, since it's still possible to express this intent using casts.) cheers, DaveK -- Can't think of a witty .sigline today....