Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!lll-winken!gauss.llnl.gov!casey From: casey@gauss.llnl.gov (Casey Leedom) Newsgroups: comp.arch Subject: Re: R4000 "announcement" (64-bit stuff) Message-ID: <91206@lll-winken.LLNL.GOV> Date: 13 Feb 91 11:29:14 GMT References: <90@shasta.Stanford.EDU> <1991Feb8.055009.9883@ico.isc.com> <45789@mips.mips.COM> Sender: usenet@lll-winken.LLNL.GOV Organization: Lawrence Livermore National Laboratory Lines: 36 Nntp-Posting-Host: gauss.llnl.gov | From: mash@mips.COM (John Mashey) | | At one point in time, C and UNIX really KNEW that an int, and a pointer | were 16-bits long. Then, C got "long", to at least do 32-bit | calculations, and "int" became whatever was convenient. Inside Bell | Labs, before UNIX got ported to other machines, C at least was available | on various 32-bit architectures (like S/360). | | As UNIX got ported to other 32-bit machines, all of us bad people who'd | figured int & char * were the same thing suffered, but everybody learned | pretty quickly not to assume this, and how to write code that would work | both on the 32-bitters (for future) and for 16-bitters (for installed | base). ... I hate to disappoint you John, but the current installed code base is *VERY* sloppy about short vs. int vs. long vs. char * vs. ... When we ported 4.3BSD to the PDP-11 one of the biggest problems was the assumption that int == long in the BSD code. I corrected literally thousands of such errors. I don't think that the next move will be any easier. Nor do I think such a move will ever be easy until we throw away lint, an abomination that should never have existed, and install its functions into the compiler itself so programmers can never escape it. This won't solve all of our problems, but it will go a long way. At least many modern compilers are much more picky about what they'll accept. The old V6 compiler would let you do: int i, j; i = j.foo; Where foo is a field member of some structure. Absolutely incredible. And the V6 kernel was full of such coding. Casey