[comp.sys.atari.8bit] A C Compiler

smk@cbosgd.ATT.COM (Stephen Kennedy) (05/08/87)

I am currently putting the finishing touches on a custom version of
Deep Blue C (DBC).  New features currently supported are:

    1.  aggregate types:  structs, unions, and arrays (including multi-
        dimensional arrays).  (No fields, sorry!)

    2.  combinations of types, i.e., "pointer to pointer to function
	returning pointer to ..."

	a. functions may return int, char, and pointers to anything

	b. indirect function calls properly supported, i.e., "(*pfunc)()"

    3.  sizeof and type cast operators.

    4.  . and -> operators.

    5.  goto statement.

    6.  "static" declarations.

    7.  #define "functions", #ifdef, #else, and #endif.

    8.  Compiles a little bit more than 2.5 times faster than DBC.  Even
	faster if program contains a significant number of defines, as
	DBC macro processing is horrific.  Don't know how it compares to
	ACE C.  Definitely slower than Lightspeed C (from what I can
	tell from the ANALOG article).

Some limitations (off the top of my head):

    1.  Only two pools of identifier names: global and local.  The "global"
	pool includes anything declared at the outer level, struct/union tags,
	and struct/union component names.  The "local" pool includes
	function arguments, local variables, and labels.

    2.  No strong type checking (yet, at least).

    3.  Code produced by new compiler is only slightly more optimal than
	that produced by the old DBC compiler.  Sigh.

    4.  Any limitations DBC had that exist.

The object code produced is compatible with the original DBC linker but
not with the original DBC.OBJ.  The new version of DBC.OBJ will run anything
produced by the original DBC compiler.

Is anyone interested in this?  I'd like to post it, but I'm not sure of
the legalities involved.  Any advice?

Steve Kennedy		{umm...err...}!cbosgd!smk