Weird C++ changing syntax inside while loop. :D

Hi.

Got a crazy C++ “bug?” today and would like to get some feedback…

The issue:
[FONT=Courier New]

bool bMyBool = false;

while(bWhatever)
{

 if(bMyBool) // <- This is considered "valid" regardless the inner value and breaks
   break;

}

while(bWhatever)
{

 if(bMyBool == true) //<- This keeps the loop til I assign true somewhere.
   break;

}

On all my remaining code I could use if(Boolean) and if(!Boolean), so I’m almost sure it’s not syntax.

Any explanation? LOL

Please provide a full source example. Where is bWhatever defined?

I set the values on the object Constructor, they’re declared on .h
.h
bool bWhatever;
bool bMyBool;

On construct (cpp)
Object::Object()
{
bWhatever = true;
bMyBool = false;
}

uint32 Object::Run(void)
{
while(bWhatever)
{
if(bMyBool == true) //<- This is the way I got to work, if(bMyBool) ignores the bMyBool value
{
break;
}
}
return 0;
}

void Object::Stop(void)
{
bWhatever = false;
bMyBool = true; // Stop this “NOW”!!!
}