Øivind:

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.

OK, so it's like in the chained < comparisons.

So I presume D disallows the chained equality for the same reasons it disallows the chained < comparisons.

Bye,
bearophile

Reply via email to