Checksum: 17684
Lines: 12
Path: utzoo!sq!msb
From: msb@sq.uucp (Mark Brader)
Date: Thu, 10-Mar-88 14:02:12 EST
Message-ID: <1988Mar10.140212.8578@sq.uucp>
Newsgroups: comp.lang.c
Subject: Re: Header problems
References: <2550049@hpisod2.HP.COM> <7412@brl-smoke.ARPA> <3351@chinet.UUCP> <8803091720.AA09301@explorer.dgp.toronto.edu>
Reply-To: msb@sq.UUCP (Mark Brader)
Organization: SoftQuad Inc., Toronto

> 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@sq.com
#define	MSB(type)	(~(((unsigned type)-1)>>1))
