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 Subject: Re: standardizing integral type sizes Message-ID: <7917@utzoo.UUCP> Date: Thu, 16-Apr-87 11:30:00 EST Article-I.D.: utzoo.7917 Posted: Thu Apr 16 11:30:00 1987 Date-Received: Thu, 16-Apr-87 11:30:00 EST References: <791@xanth.UUCP> Organization: U of Toronto Zoology Lines: 19 > I would like to see the sizes of C integral types standardized. It would be > much easier to write portable code if when I define a variable as an 'int' I > could automatically know that its range is -128 to 127, or -32768 to 32768, > etc. > ... > Besides savaging quite a few C implementations, what are the other drawbacks > to this?... It loses us the current semantics of "int", which are "the form of integer that is most efficient on the machine in question". Since most well-written code doesn't care whether int is 16 or 32 bits (N.B. there is a lot of badly-written code in the world), current C compilers are free to pick the one that runs faster. This can make quite a difference in performance. All the world is *not* a VAX. To quote Dennis Ritchie: "if you want PL/I, you know where to find it". -- "We must choose: the stars or Henry Spencer @ U of Toronto Zoology the dust. Which shall it be?" {allegra,ihnp4,decvax,pyramid}!utzoo!henry