Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site l5.uucp Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!sun!l5!laura From: laura@l5.uucp (Laura Creighton) Newsgroups: net.lang.c Subject: Re: Code Generation (register byte, short...) Message-ID: <289@l5.uucp> Date: Wed, 27-Nov-85 12:27:04 EST Article-I.D.: l5.289 Posted: Wed Nov 27 12:27:04 1985 Date-Received: Fri, 29-Nov-85 00:28:25 EST References: <29@brl-tgr.ARPA> <703@petrus.UUCP> Reply-To: laura@l5.UUCP (Laura Creighton) Organization: Nebula Consultants in San Francisco Lines: 21 In article <703@petrus.UUCP> hammond@petrus.UUCP (Rich A. Hammond) writes: > >The problem is really the brain damage among UNIX hackers that assumes >sizeof(int) == sizeof (char *). This is so painful to fix (for quick ports) >that although the 68000's int should be 16 bits (the size that works best, >fastest, ...) it is often made 32 bits. While this avoids the pain for the >porter, it does lead to problems for the end user (i.e. using short vs int). > Unless you intend to do a lot of multiplying and dividing, I can't see what you would gain in making ints 16 bits. You *won't* get a significantly faster port, because you have to go through all the code and check for (at a minimum) dereferencing null pointers, and while you are at that you can get those as well. A harder problem is code that assumes sizeof(int *) == sizeof(char *) == sizeof(struct foo *). Use lint. realise that correct code is not just code that happens to not dump core very often on your machine. Use lint. -- Laura Creighton sun!l5!laura (that is ell-five, not fifteen) l5!laura@lll-crg.arpa