[net.lang.c] Datalight C

bjorn@dataioDataio.UUCP (Bjorn Benson) (12/04/85)

Rejoice ye not quite perfect programmers! (like me)

I found this nice C compiler for the 8086 (IBM-PC and kin) that has some
of the best error messages I have seen.  For example, when I use the
complicated pointer expressions that C allows, I commonly get mixed up
on the *s, ()s, []s, etc.  Datalight C gives good CLEAR error messages, 
as opposed to, say, Lattice C.  For example:

- - - - - - - - - - - - - - The Program - - - - - - - - - - - - - - - - - - -
/*
 * Show off some neat features of Datalight C
 */

extern char *func();

main()
{
  char (*(*a_func_ptr)())[10];
  int a_var;

  a_var = a_func_ptr;
}

int func()
{
  /* A do nothing function */
}

- - - - - - - - - - - - - - - Datalight C - - - - - - - - - - - - - - - - -
DLC1 1.10 Copyright (C) 1985 by Datalight, written by Walter Bright
function main
  a_var = a_func_ptr;
                    ^
"test.c", line 12 Warning: pointer mismatch
<int> and <pointer to><function returning><pointer to><array of[10]><char>
{
^
"test.c", line 16 Syntax error: 'func' previously declared as something else
It was declared as: <function returning><pointer to><char>
function func

- - - - - - - - - - - - - - - Lattice C - - - - - - - - - - - - - - - - - - -
Lattice C Compiler (Phase 1) V2.14
Copyright (C) 1982 Lattice Inc.
test.C 12 Warning 30: pointers do not point to same object
test.C 16 Error 72: external item attribute mismatch
test.C 18 Error 2: unexpected end of file
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This compiler is about the best I've found for the PC, and it certainly
helps track down syntax/semantic errors quickly.  Now if only I could find
a symbolic debugger for the PC...

Anyway, Datalight C does good error recovery, it's inexpensive ($60),
it compiles fast, and the resulting .EXE file runs fast.  I use it.

					Bjorn Benson
					..!uw-beaver!entropy!dataio!bjorn

P.S. Datalight, 11557 8th Ave NE, Seattle WA, 98125, (206) 367-1803
P.P.S. Usual disclaimer... no financial interest... etc...