problem with C++ keyword true

Steve Bliss bliss1940-bbs@yahoo.com
Mon Sep 27 10:50:00 GMT 2004


I'm using avr-gcc version 3.4.1 to compile C++.

Here's the problem:

bool george = true;

if(george == true)
{
   // never gets here
}
else
{
   // always gets here
}


In other words, the expression (george == true) is always false.  Isn't this
a compiler bug?

For whatever it's worth, the value of george is 0x01 and the value of true
seems to be 0xff.




More information about the Gcc-help mailing list