Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ll-xn!adelie!mirror!xanth!kyle From: kyle@xanth.UUCP Newsgroups: comp.lang.c Subject: standardizing integral type sizes Message-ID: <791@xanth.UUCP> Date: Tue, 7-Apr-87 02:48:13 EST Article-I.D.: xanth.791 Posted: Tue Apr 7 02:48:13 1987 Date-Received: Sat, 11-Apr-87 03:01:59 EST Organization: odu computer science, norfolk, va Lines: 21 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. One proposal might be: char 8 bits short 16 bits int 32 bits long 64 bits Having compilers on 16-bit machines generate code to handle 64-bit long's may be cumbersome, but just knowing how "large" each type is would (probably) make programmers more conscientious about which types they use. Thus those "huge" long's won't be needlessly used as often. Besides savaging quite a few C implementations, what are the other drawbacks to this? Has this already been proposed? kyle@xanth.cs.odu.edu (kyle jones @ old dominion university, norfolk, va)