Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!decwrl!hplabs!hp-ses!hpcea!hpnmdla!hpmwtd!jeffa From: jeffa@hpmwtd.HP.COM (Jeff Aguilera) Newsgroups: comp.arch Subject: Re: Re: 80486 vs. 68040 code size [really: how many regs] Message-ID: <670005@hpmwjaa.HP.COM> Date: 1 Jun 89 19:29:26 GMT References: <19063@winchester.mips.COM> Organization: HP Microwave Tech. - Santa Rosa, Ca. Lines: 36 > And then there are the sloppy programmers, the > ones who assume (as you mention) that pointers and ints are the same size, > or that ints are 32 bits, or that ints and longs are the same size and can > be used interchangeably (this is depressingly common in the Unix world today, > and last I looked, both Berkeley and AT&T were aiding and abetting this > disgusting practice). Alas, one cannot just ignore the sloppy programmers; > sometimes one wants to run code they wrote without having to clean it up. > -- > Henry Spencer > ---------- This is a problem with poor language design, not sloppy programming. C provides no means for a programmer to express the intended range of an integer. The X Window System, for example, defines many integer subtypes: INT16, INT32, UINT16, etc. The short-int-long difficulties are isolated with typedefs, but problems still linger. 36-bit architectures, for instance, are a major headache. On page 182 of the first edition of "The C Programming Language," Kernighan and Ritchie summarize the characteristics of several implementations of C: DEC PDP-11 Honeywell IBM 370 Interdata 6000 8/32 ASCII ASCII EBCDIC ASCII char 8 bits 9 bits 8 bits 8 bits int 16 36 32 32 short 16 36 16 16 long 32 36 32 32 float 32 36 32 32 double 64 72 64 64 When 64-bit machines are the rave, will short-int-long refer to 16-32-64 bit integers? Or 32-64-64? Or 36-36-36 :-? The programmer needs more control than provided by C. -------- jaa