Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!wuarchive!rex!samsung!sol.ctr.columbia.edu!emory!mephisto!ncar!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!peter From: peter@sugar.hackercorp.com (Peter da Silva) Newsgroups: comp.sys.amiga.tech Subject: Re: malloc under Lattice C V5.05 Message-ID: <6663@sugar.hackercorp.com> Date: 30 Sep 90 13:00:45 GMT References: <3034@orbit.cts.com> <1990Sep23.061925.6887@jato.jpl.nasa.gov> <6620@sugar.hackercorp.com> <13660@mcdphx.phx.mcd.mot.com> Reply-To: peter@sugar.hackercorp.com (Peter da Silva) Organization: Sugar Land Unix - Houston Lines: 22 > In article <6620@sugar.hackercorp.com> peter@sugar.hackercorp.com (Peter da Silva) writes: > >(As an aside: most 68000 compilers I've used in the past have returned > > pointers in A0 and ints in D0. Seems like an obvious move. I guess Manx > > and Lattice had other priorities.) In article dillon@overload.Berkeley.CA.US (Matthew Dillon) writes: > This type of 'buggy' program is such an obscure bug that I fault the > compilers for trying to do the A0/D0 business without adding > appropriate cautions. Why? Any program that fails on this sort of compiler will also fail on any compiler where sizeof(int) != sizeof(char *) (like Aztec C on the Amiga in default mode prior to 5.0, or any IBM-PC compiler with reasonably large programs). Far from being an obscure bug, it's by far the most common one in BSD/VAX originated software. If you want to play games with the name, why not put the *whole* prototype into the name? (frex, if you have (void *)malloc(unsigned), make the real name of the routine vp$malloc$u) -- Peter da Silva. `-_-' .