> int b = x == y == z; Although GCC accepts the code, I don't think it does what you think here. It will basically z will be compared with '1', which is the value of (4 == 4), and b will become 0, or false.