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: net.lang.c Subject: Re: Integer sizes; storage classes. Message-ID: <3963@utzoo.UUCP> Date: Tue, 19-Jun-84 18:55:38 EDT Article-I.D.: utzoo.3963 Posted: Tue Jun 19 18:55:38 1984 Date-Received: Tue, 19-Jun-84 18:55:38 EDT References: <4301@edai.UUCP> Organization: U of Toronto Zoology Lines: 21 Richard O'Keefe observes that at least one 6809 compiler makes int only 8 bits. Clearly there's a compromise here: the 6809 is not a great 16-bit machine, and it does much better if things are 8 bits whenever possible. C, alas, basically requires everything to turn into ints whenever you do anything. I fear that this tradeoff will exist for almost any 8-bit machine: do you want fast code, or portable code? Clearly we're not going to get a consensus of all customers on this, because needs differ. The question of whether C int's are required to be big enough to hold the difference between pointers to the two ends of an array is, uh, unresolved. 68000 C compilers with 16-bit int and 32-bit addresses have the same problem. As far as the "readonly" storage class, the draft ANSI C standard does have a construct along these lines, although it's not quite the same. They haven't done it as a storage class, so you can make such things static without any problems. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry