Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: Re: Lattice/UNIX incompatibility Message-ID: <4834@utzoo.UUCP> Date: Fri, 28-Dec-84 17:45:57 EST Article-I.D.: utzoo.4834 Posted: Fri Dec 28 17:45:57 1984 Date-Received: Fri, 28-Dec-84 17:45:57 EST References: <233@gumby.UUCP>, <3194@alice.UUCP> Organization: U of Toronto Zoology Lines: 27 > Every version of the Lattice compiler I have seen has four > non-standard things: > > ... > > 3. Every declaration of an external variable but > one must say 'extern'. > > 4. Case is ignored in external variables. These two are actually legitimate C. In fact, if you look carefully at K&R, it would appear to *require* #3, although in fact many of the real implementations are looser. (This is about the way the ANSI C people are treating it, too.) #3 is often necessary in non-Unix systems because the linker insists that an occurrence of an external variable is either (a) a reference to something declared elsewhere, or (b) a (unique) declaration, and you *must* specify which. So you cannot just treat all occurrences as equivalent, the way the Unix setup does; one of them (or all but one of them) must be specially marked. #4 is likewise a legitimate variation when coping with stupid linkers. Whether either of these is actually *necessary* in the environment the Lattice compiler is running in, I can't say. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry