Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!topaz!nike!lll-crg!lll-lcc!pyramid!amiga!jimm From: jimm@amiga.UUCP (James D. Mackraz) Newsgroups: net.micro.amiga Subject: Re: beta 4 Message-ID: <1478@amiga.amiga.UUCP> Date: Thu, 7-Aug-86 15:53:17 EDT Article-I.D.: amiga.1478 Posted: Thu Aug 7 15:53:17 1986 Date-Received: Sat, 9-Aug-86 06:14:39 EDT References: <661@usc-oberon.UUCP> <1468@amiga.amiga.UUCP> <870@tekigm.UUCP> Reply-To: jimm@homer.UUCP (Jim Mackraz) Distribution: net Organization: Commodore-Amiga Inc., 983 University Ave #D, Los Gatos CA 95030 Lines: 40 In article <870@tekigm.UUCP> phils@tekigm.UUCP (Phil Staub) writes: >In article <1468@amiga.amiga.UUCP> neil@rocky.UUCP (Neil Katin) writes: >> >>HOWEVER, your code needs to be fully reentrant to live on this list. >>Neither lattice C nor emacs are reentrant. It turns out that all BCPL >>programs are. C programs can be written so that they are reentrant, >>but they typically are not. >> > >Question: > >I am interested to know what it is about the lattice C compiler that >generates non-reentrant code. I am not familiar with this compiler, >but (at least according to my understanding) any code which does not utilize >static or extern variables (i.e., only uses automatics or registers) should >be re-entrant in C. I also know that with some compilers, functions which >return structures do so in a non-reentrant way. Are these the only >non-reentrancies to which you refer, or is there a gap in my understanding >about reentrancy, or is there something else about Lattice which is >non-reentrant. > >Thanks Since I read Neil's posting the same way you did, I'll make the clarification. 1) The Lattice C Compiler is not itself a re-entrant program. The reason this bears mentioning is that having a resident compiler was our in-house motivation for resident programs (it is a large program that is loaded again and again in a typical development session). 2) Perhaps the Lattice C Compiler can create re-entrant code. Indeed some compilers create non-reentrant code, when returning structures, for example. Greenhills does this, and I almost set myself up for the most insidious of bugs in Intuition by not respecting this. I do not know what things to watch out for with Lattice. Another area of concern would be the startup code (and other linked libraries) which might contain statics. I can't see a way to be sure of this stuff without consulting Lattice. Go Wild. jimm Amiga/Commodore