Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site datagen.UUCP Path: utzoo!linus!security!genrad!grkermit!masscomp!clyde!floyd!cmcl2!rocky2!datagen!mrm From: mrm@datagen.UUCP Newsgroups: net.bugs.4bsd Subject: Re: NULL pointer Message-ID: <55@datagen.UUCP> Date: Thu, 19-Jan-84 10:48:57 EST Article-I.D.: datagen.55 Posted: Thu Jan 19 10:48:57 1984 Date-Received: Sat, 21-Jan-84 02:31:43 EST Organization: Data General Dist. Systems, Westborough, MA Lines: 21 Ah yes, the NULL pointer -- some versions of C on the 68000 treat int's as 16 bits, while pointers are 32 bits, so just passing 0, without casting it will give you the incorrect results/memory dump you deserve. Also, some machines (such as the PRIME, DEC10, etc.), have longer char * pointers than say int * pointers, so you have to cast the pointer correctly (on the Data General MV machine, which I write a C compiler for, we have a different format for char * pointers, as opposed to int * -- but the NULL pointer has the same representation under both). Also, while I'm talking about the NULL pointer, various operating systems and/or machines (such as VMS, AOS/VS, etc.) that C code gets run on these days also do not allow the NULL pointer to be dereferenced (`*'), so code that assumes *(char *)0 gives a 0 back will abort. Other implementations (such as some versions of Whitesmith's) put the copyright notice at location 0, or anything else the linker desires. Michael Meissner Data General Corporation 4400 Computer Drive Westborough, Mass. 01580 ...{ allegra, decvax!ittvax, rocky2 }!datagen!mrm