My compiler (VC++ 6.0 sp6) has apparently gone insane. In certain pieces of code I'm seeing that 'bool mybool = true;
' evalutes to and assigns false, and vice versa for true. Changing the true/false keywords to 1/0 makes it work fine. The same code compiles elsewhere fine without changing the true/false keywords.
What could possibly cause this? My first thought was RAM or disk corruption, but that all checked out fine. I'm not far from reformatting my drive and reinstalling everything, but I'm terrified I'd still see the same misbehavior.
Is it even technically possible for a macro or linked-in library somewhere to screw up the meaning of 'true
' and 'false
'?
UPDATE: Mystery solved. An environment variable flag on my machine was set to 'false' and the way this was interpolated by some preprocessor code redefined the keyword.