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: C compiler for pdp-11 under RSX Message-ID: <3946@utzoo.UUCP> Date: Fri, 8-Jun-84 16:53:55 EDT Article-I.D.: utzoo.3946 Posted: Fri Jun 8 16:53:55 1984 Date-Received: Fri, 8-Jun-84 16:53:55 EDT References: <1880@sdccsu3.UUCP>, <192@dicomed.UUCP> <2849@brl-vgr.ARPA>, <873@orca.UUCP> Organization: U of Toronto Zoology Lines: 31 In regard to the following commentary: "I believe they [Whitesmiths] may also be removing the requirement that all extern storage definitions (not declarations) be initialized exactly once among all load modules." They can't. Remember that Whitesmiths' original claim to fame was in providing C compilers for a great many machines running operating systems other than Unix. On many systems, the loader doesn't speak COMMON blocks and requires that a single module (file) EXPORT a symbol and that all other modules IMPORT it. When compiling C code a file at a time, there is no way to do this with the existing language definition. The language mod allows a global symbol to be EXPORTed when initialized, IMPORTed when not initialized. I can't think of a language change which is much less painful and which will satisfy this class of linkers. If you read the C Reference Manual, section 11.2, carefully, you will see that there is already a solution to this problem present in C. It does *not* require language changes, and it does *not* require the misuse of initializers. NB The C.R.M. I'm looking at is the one in the back of the K+R book; anything much older may not show the same statement. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry