Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: comp.lang.c,news.software.b Subject: Re: passing NULL to functions Message-ID: <7974@utzoo.UUCP> Date: Tue, 28-Apr-87 11:43:54 EDT Article-I.D.: utzoo.7974 Posted: Tue Apr 28 11:43:54 1987 Date-Received: Tue, 28-Apr-87 11:43:54 EDT References: <150@sds.UUCP>, <1129@ius2.cs.cmu.edu> Organization: U of Toronto Zoology Lines: 18 > Are you saying that you are not guarenteed sizeof(char *) == sizeof(int *) > sizeof(long *) == sizeof(whatever *)? ... Precisely. The major reason this arises is that on word-addressed machines, e.g. Data General systems (unless they've changed since I knew them), the "normal" pointer format points only to a word, and there are no spare bits in the pointer that could be used to point to a byte within the word. (The use of such spare bits is a major reason why the representation of "char *" can differ from the representation of "int *" even on machines where the sizes of the two pointers are the same.) There is just no way to point to a character except to define a longer kind of pointer to hold the extra information. Actually, there is nothing guaranteeing that *any* of those sizes are the same, but sizeof(char *) is usually the anomalous one in practice. -- "If you want PL/I, you know Henry Spencer @ U of Toronto Zoology where to find it." -- DMR {allegra,ihnp4,decvax,pyramid}!utzoo!henry