29 Jan
2005
29 Jan
'05
3:44 a.m.
A couple of follow up points. The function that seems to be returning the funny value is defined only in a header file. I am completely unable to get a bool that prints as anything but 1, even when I initialize it with another value or overwrite the same memory location with another bit pattern. (obviously I didn't try false or 0). The strange behavior persists at -O0 and with -fno-default-inline. With those settings I see in the debugger that the original variable from which the value is taken is a boolean with value 76. The test fails even if both sides get static_cast<bool>