sizeof (integral types)
Doug Gwyn
gwyn at smoke.BRL.MIL
Sat Apr 29 12:39:39 AEST 1989
In article <1514 at auspex.auspex.com> guy at auspex.auspex.com (Guy Harris) writes:
>(What happens to "-0" on a one's complement or sign-magnitude machine?)
The integer value -0 has to be represented the same as 0, namely all 0 bits.
To write a "minus zero" the simplest thing is to write ~0. Of course, the
fact that your code is dealing with an explicit minus zero already makes it
dependent on ones-complement architecture. (I don't know how to do the
equivalent thing on a sign/magnitude architecture; there may be a way.)
More information about the Comp.lang.c
mailing list