C compiler for pdp-11 under RSX

Henry Spencer henry at utzoo.UUCP
Sat Jun 9 06:53:55 AEST 1984


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



More information about the Comp.lang.c mailing list