Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sccsi.com!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.lang.misc Subject: Re: Answers, Chapter 1: TeX (was C's sins... and others) Message-ID: Date: 9 Nov 90 13:44:06 GMT References: <7AZ6O15@xds13.ferranti.com> <5347@lanl.gov> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 20 In article <5347@lanl.gov> jlg@lanl.gov (Jim Giles) writes: > I know the IBM-PC is the cause of the ANSI restriction. And means that the ANSI restriction is pretty much irrelevent: if they'd left it out, then your PC compilers would have kept doing whatever it is they do, they would just be "sub ANSI". As it is you can assume that pointer comparison is safe without restrictions so long as you're not on an 80x86. > I've seen memory managers which work well on large numbers of > different types of hardware but are written in high-level languages. And they can continue to do so. The version of "malloc" in K&R1 is still as portable as it was before ANSI stepped in. > If the C standard had > required pointer comparisons to _always_ be reliable, a portable > memory manager of this kind could easily be written in C for nearly > every machine I've ever seen. Still can. One of the reasons I bought an Amiga instead of an IBM PC. -- Peter da Silva. `-_-' +1 713 274 5180. 'U` peter@ferranti.com