Header problems
Mark Brader
msb at sq.uucp
Fri Mar 11 05:02:12 AEST 1988
> By the way, if you call f(0) where f expects a char *, the requirement
> for it to work is not simply that sizeof(int) == sizeof(char *), but
> also that (int)0 and (char *)0 have the same bit representation.
*And* that the implementation passes integer and pointer type values to
functions in the same manner. Remember, arguments can be passed in registers
and machines can have several types of registers.
*Never* say f(0) or f(NULL).
Mark Brader, SoftQuad Inc., Toronto, utzoo!sq!msb, msb at sq.com
#define MSB(type) (~(((unsigned type)-1)>>1))
More information about the Comp.lang.c
mailing list