At 11:50 pm -0500 2010/12/03, Sridhar Ayengar wrote:
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
[...]
That's a pretty new standard. What did older C standards say on the
subject?
From the May 1975 version of the _C Reference Manual_
at
<http://cm.bell-labs.com/cm/cs/who/dmr/>:
7.2.4 ! expression
The result of the logical negation operator ! is 1 if the value of
the expression is 0, 0 if the value of the expression is non-zero.
--
Kevin Schoedel <schoedel at kw.igs.net> VA3TCS