@Indrora said:
That's not so much a WTF. The GCC compiler does something neat with booleans:
#define true !0
#define false !trueBy the laws of Programming Logic, "true" is simply "Anything thats not zero", but "false" is "Not true" -- so MS's logic works.
What does this have to do with GCC? The C language spec says
- any value that compares equal to 0 is "false"; any other value is "true"
- all built-in booley operators yield 0 for false and 1 for true
Your definitions are equivalent to
#define true 1
#define false 0