Eric Smith wrote:
If the compiler produces code that returns anything
other than 0 or 1
for the result of the unary logical negation operator, the compiler is
seriously broken, as the standard explicitly requires the result to be 0
or 1. See IEE/IEC 9899 (1999) section 6.5.3.3 paragraph 5.
Same for all of the relational operators (6.5.8 paragraph 6), equality
operators (6.5.9 paragraph 3), logical AND operator (6.5.13 paragraph
3), and logical OR operator (6.5.14 paragraph 3).
That's a pretty new standard. What did older C standards say on the
subject?
Peace... Sridhar