which C?

Jeff Beard jbeard at quintus.UUCP
Sun Feb 28 03:16:52 AEST 1988


In article <34422UC9 at PSUVM>, UC9 at PSUVM.BITNET writes:
> Hello, C lovers. I am pretty new here. Could you tell me which C you prefer
> in vm/cms environment? Thanks.

Waterloo C is light speed at compiling and gives an option (-a ??) of
emiting 370 assembler source with usable labels, instead of the typical
base(displacement) which makes it IMPOSSIBLE to tinker with.

The ONLY negative is the implementation of global and static variables ...
they end up as DC's in the text deck which prohibits shared modules 
(not-reentrant!).  Coding style can circumvent this by eg:

	struct _globals_
	{
		type g_v1;
		type g_v2;
		type g_v3;
	};
	#defing Var1 Globals->g_v1;
	#defing Var2 Globals->g_v2;
	#defing Var3 Globals->g_v3;

	struct _globals_ *Globals;

	Globals  = (struct _globals_ *) alloc (sizeof struct _globals_);

and like wise for module statics (suggest separate struct from _globals_).

Waterloo C sadly doesn't run on MVS, however, which caused me to pickup 
SAS/C TR-101/102.

SAS/C compiles only to object decks (no -a flag) but supplies a OMD
(Object Module Disassembler) which emits annotated listings lrecl >80 with
  B Base(Displacement) formats.

The claim-to-fame (in my book) is two fold:

	1) generated object decks are portable from/to MVS<->VM
	   (system dependancies are contained in the transient library).

	2) reentrant modules ARE possible using DXD/CXD and dynamically
	   initializing all global/static variables that have comiple time
	   assignments!

Best wishes,

	Jeff Beard



More information about the Comp.lang.c mailing list