problem with C++ keyword true

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux