BarsMonster

Why ~ not supported?

Discussion created by BarsMonster on Jan 4, 2009
error C2675: unary '~' : '__BrtInt1' does not define this operator or a conversion to a type acceptable to the predefine

Is it a known issue that ~ does not work?

This code

somevalue = ((~x) & (z));

get compiled in brcc without errors/warnings, but during c++ compilation of generated cpp file, I'm getting:

error C2675: unary '~' : '__BrtInt1' does not define this operator or a conversion to a type acceptable to the predefined operator

(VS2005)

 

Now I am using a workaround (((-1)^x) & (z)), but I afraid it might have performance penalty :-(

Outcomes