[comp.lang.c] which C?

UC9@PSUVM.BITNET (02/24/88)

Hello, C lovers. I am pretty new here. Could you tell me which C you prefer
in vm/cms environment? Thanks.

jbeard@quintus.UUCP (Jeff Beard) (02/28/88)

In article <34422UC9@PSUVM>, UC9@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

STROBL%DBNGMD21.BITNET@CUNYVM.CUN (Wolfgang Strobl 49+228303223) (03/01/88)

Jeff Beard <jbeard@quintus.uucp> writes
> In article <34422UC9@PSUVM>, UC9@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 sadly doesn't run on MVS, however, which caused me to pickup
> SAS/C TR-101/102.

This is wrong. We installed Waterloo C on MVS in 1986 and used it for
some time. We later had a look at SAS C (i.e. Lattice C).  Currently we
use IBM C (really Whitesmith C), with mixed feelings.

Wolfgang Strobl, GMD Z1.BN