[net.lang.c] Survey of C Compilers

ear@duke.UUCP (07/17/86)

Its been some time since I saw a query on the state of C compilers for PC's
(and even longer since I posted a query on this subject).  C'mon.  If you C
hackers feel so strongly about the language, why not post (or mail) a little
advice on your (least) favorite implementation.  If anyone has received any
response to a similar query, could they please post (or mail me) a summary?




-- 
Eric A. Raymond                                   UUCP: ...decvax!mcnc!duke!ear

brad@looking.UUCP (Brad Templeton) (07/18/86)

I have used several C compilers in my projects and here are the summaries:

1) Microsoft C
	The winner:
		- It comes from a large firm dedicated to languages
		- The only compiler to take my 30,000 line program and have
		  it run essentially right away.
		- Support has been reasonable for me, but I'm a beta tester.
		- One of the two compilers to have compiled a Unix, so you know
		  it is fairly compatible with the Unix compilers.
		- If you dare the use it, the hybrid model support is of
		  tremendous value.  Our system in hybrid model is about 2/3
		  the size of the large model version.  This made the difference
		  in running on a 256K PC or not.
		- Ansi C style argument type checking.
		- Runs under Xenix to Cross compile for DOS
2) Lattice C
	This is one of the best selling and it is well supported.
	The original version was unacceptable.   It lacked things like
	"unsigned int" (you just said unsigned) and structure assignment.
	Not much hope of compiling Unix style programs.

	They have a new release which supposedly fixes these problems and
	brings it up to a similar level with Microsoft C.  I have not played
	with this one.  Supposedly they also have a Xenix version.

	Their compiler is also available for the 68000 but really bad reports
	have come in.

3) Mark Williams C
	This compiler is the other to have compiled a Unix like system, in
	this case Coherent.  Fairly good code quality but:
		It can't handle a function over about 800 lines as the
		optimizer runs out of space.

		Support was not good in that we found several problems
		(like the above) for which there was no good workaround, and
		we were told to wait months for new releases. 

	We gave up on this compiler, although we are using it again on the
	68000.  Support is much better now.

4) QNX C compiler
	This compiler runs only under QNX, but they now have a dos cross
	compiler option.

	QNX is an elegant, very fast OS but it is still young and lacking
	in certain "creature comforts" found under Unix.  Programs here
	are limited to medium model, but this compiler supports an interesting
	convetion that allows fast access to the extra segment of the 8086.

	Non portable (we make all references with macros to avoid trouble) but
	can be even more compact (if harder to use) than the Microsoft hybrid
	schemes.

5) DeSmet C compiler
	Been a while since I used it, but it is inexpensive and fast.  A good
	toy for playing around with.  Back then it only had small model.
	I hear this has changed.

6) Wizard C.
	No personal experience, but friends say it is fairly good.  From too
	small a company if this matters to you, though.



So in the long run, Microsoft C is the winner.  We run it under Xenix which
means that we don't even have to use dos except for testing.  Documentation
of the DOS functions is very poor in the Xenix version, though.
-- 
Brad Templeton, Looking Glass Software Ltd. - Waterloo, Ontario 519/884-7473

johnl@ima.UUCP (John R. Levine) (07/21/86)

In article <613@looking.UUCP> brad@looking.UUCP (Brad Templeton) writes:
>6) Wizard C.
>	No personal experience, but friends say it is fairly good.  From too
>	small a company if this matters to you, though.
>So in the long run, Microsoft C is the winner. ... 

Funny, in my book the problem with MS-C is that it's from too large a
company.  On the infrequent occasions when I have trouble with my Wizard
C compiler, I call up Mr. Wizard, chat with him for a few minutes, and
I can count on my problem being fixed in the next update, usually within
a month.  Good luck getting Microsoft to do that.  I compared Wizard and
MS-C a while ago and found that Wizard won marginally in code size and
substantially in bug-free-ness and diagnostics.  Both MS and Wizard have
new releases of their compilers out and I have yet to try them.
-- 
John R. Levine, Javelin Software Corp., Cambridge MA +1 617 494 1400
{ ihnp4 | decvax | cbosgd | harvard | yale }!ima!johnl, Levine@YALE.EDU
The opinions expressed herein are solely those of a 12-year-old hacker
who has broken into my account and not those of any person or organization.

cramer@kontron.UUCP (Clayton Cramer) (07/21/86)

I'm not really disagreeing with Brad, but I do have a few comments about
our experiences here at Kontron with the Microsoft C compiler.

> 
> I have used several C compilers in my projects and here are the summaries:
> 
> 1) Microsoft C
> 	The winner:
> 		- It comes from a large firm dedicated to languages
> 		- The only compiler to take my 30,000 line program and have
> 		  it run essentially right away.

Early on in our project, we move 12,000 lines of source from Berkeley 4.2
UNIX on a VAX to Microsoft C under PC-DOS.  It only took six hours to find
all the differences between PC-DOS & UNIX, and to find incompatible chunks
of C.  (The incompatibilities were just about all our fault.)

> 		- Support has been reasonable for me, but I'm a beta tester.

Support has been poor to useless for us.  The questions we ask usually get
pretty useless answers, because they are usually telling us to do things
that the manuals warned about.

> 		- Ansi C style argument type checking.

Nice feature, but incompatible with the Berkeley 4.2 C compiler.  (I use 
this feature at home a lot, though.)

> Brad Templeton, Looking Glass Software Ltd. - Waterloo, Ontario 519/884-7473

Additionally, we have run into a few maddening bugs:

1. A parameter is declared as a register pointer to a structure -- it
generated spurious code.  (No, I don't consider register declarations for
a 8086 family machine sensible -- the declaration exists for historical
reasons.)

2. If you scanf a floating point variable, the linker will not grab the
8087 emulator unless you have AT LEAST one floating point arithmetic
operation in the program.  This is documented (sort of), but I'm a little
disappointed that the compiler doesn't generate the right floating point
emulator library references because of the float declarations without
an float operation.

3. Under some ill-defined conditions, the following parameter declarations
are not equivalent:

	char	*String;

	char	String[];

Overall, I'm very pleased with the Microsoft C V3.0 compiler.  The
number and type of bugs are completely acceptable for a compiler.

Clayton E. Cramer

Schauble@MIT-MULTICS.ARPA (Paul Schauble) (07/22/86)

Does anyone have experience with High-C?

djfiander@watnot.UUCP (David J. Fiander) (07/22/86)

>> 
>> I have used several C compilers in my projects and here are the summaries:
>> 
>> 		- Support has been reasonable for me, but I'm a beta tester.
>
>Support has been poor to useless for us.  The questions we ask usually get
>pretty useless answers, because they are usually telling us to do things
>that the manuals warned about.
>

Whenever we phoned up about a problem we were generally told that "that problem
doesn't exist" because no-one else had reported it.

One big bug that we found was not in the compiler itself but in the library.
In our product, we would try to malloc() most (if not all) of the free memory,
and after enough malloc()'s, we would start getting back pointers that pointed
into space that we already owned.  Eventually we took the malloc() and free() 
out of K&R and used that instead of the library routines.
-- 

----------

"Butterflies are free.  This means you can have as many as you want"
				-Sally Brown

    UUCP  : {allegra,ihnp4,decvax,utzoo,clyde}!watmath!watnot!djfiander
    CSNET : djfiander%watnot@waterloo.CSNET
    ARPA  : djfiander%watnot%waterloo.csnet@csnet-relay.ARPA
    BITNET: djfiande@watdcs

friesen@psivax.UUCP (Stanley Friesen) (07/22/86)

In article <613@looking.UUCP> brad@looking.UUCP (Brad Templeton) writes:
>
>I have used several C compilers in my projects and here are the summaries:
>
>1) Microsoft C
>	The winner:
>		- Ansi C style argument type checking.
>2) Lattice C
>	This is one of the best selling and it is well supported.
>	The original version was unacceptable.   It lacked things like
>	"unsigned int" (you just said unsigned) and structure assignment.
>	Not much hope of compiling Unix style programs.
>
>	They have a new release which supposedly fixes these problems and
>	brings it up to a similar level with Microsoft C.  I have not played
>	with this one.  Supposedly they also have a Xenix version.
>
	Yes, the new release fixes these problems. It also has a pcc
compatible void type(i.e. void functions only) and Ansi C style argument
type checking. Furthermore the delivered library is much larger and
more useful. It now contains most of the important routines from the
Ansi draft standard and the Sys V interface specification, as well as
support for most of the features of MS-Dos up through version 3.1. A
vast improvement.
>
>
>6) Wizard C.
>	No personal experience, but friends say it is fairly good.  From too
>	small a company if this matters to you, though.
>
	Yes, it is fairly good, and support is *mostly* fairly decent.
One nice feature is its extended Large Model(called Huge Model),
unfortunately that model is somewhat buggy. The latest release also
has a significant bug in Large Model floating point arithmetic, for
which we are waiting for a fix.
-- 

				Sarima (Stanley Friesen)

UUCP: {ttidca|ihnp4|sdcrdcf|quad1|nrcvax|bellcore|logico}!psivax!friesen
ARPA: ??

steven@mcvax.uucp (Steven Pemberton) (07/24/86)

In article <613@looking.UUCP> brad@looking.UUCP (Brad Templeton) writes:
> I have used several C compilers in my projects and here are the summaries:
> 
> 1) Microsoft C
> 	The winner:
> 		- It comes from a large firm dedicated to languages
> 		- The only compiler to take my 30,000 line program and have
> 		  it run essentially right away.
> 		- Support has been reasonable for me, but I'm a beta tester.

I agree that MS C is the best compiler, but support? I have written to them
several times about support issues, both electronically and on paper, and
have never once had any reply from them whatsoever. Fooey.

Steven Pemberton, CWI, Amsterdam; steven@mcvax.uucp

petera@utcsri.UUCP (Peter Ashwood-Smith) (07/26/86)

    Since I have just seen a couple of recommendations for the MS C compiler
and having never used it I would like to know how good is its large model.
Does it produce faster code than Lattice? Speed and correctness are my major
concern.

 Peter Ashwood-Smith

bc@cyb-eng.UUCP (Bill Crews) (07/28/86)

>     Since I have just seen a couple of recommendations for the MS C compiler
> and having never used it I would like to know how good is its large model.
> Does it produce faster code than Lattice? Speed and correctness are my major
> concern.
> 
>  Peter Ashwood-Smith

You'd better be more explicit about the memory model you are interested in;
Lattice large is Microsoft huge model.  Best to describe what size (and
format) of data and code pointers you want.
-- 
bc				Bill Crews @ NetCor Data International

..!{seismo,gatech,ihnp4}!ut-sally!cyb-eng!bc  (512) 835-2937

sandersr@ecn-pc.UUCP (Robert C Sanders) (08/01/86)

In article <613@looking.UUCP> brad@looking.UUCP (Brad Templeton) writes:
>I have used several C compilers in my projects and here are the summaries:
>
>1) Microsoft C
>2) Lattice C
>3) Mark Williams C
>4) QNX C compiler
>5) DeSmet C compiler
>6) Wizard C.
>
>So in the long run, Microsoft C is the winner.  We run it under Xenix which
>means that we don't even have to use dos except for testing.  Documentation
>of the DOS functions is very poor in the Xenix version, though.
>-- Brad Templeton

You forgot Computer Innovations C86; it too will run under Xenix (or at least
their Xenix version), and cross compile for Xenix or MS DOS.  As someone
posted recently, CII C86 produces slightly larger code than MS C, but it too
supports ANSI style argument parsing and medium model.  It too is very UNIX
oriented (it is developed on a UNIX machine); I have no problem porting
anything across.  It also has options to make symbols 8-char or 31-char
significant.  It is better than Latice C, so on the scale above I would
rank it 1.5.
-- 
Continuing Engineering Education Telecommunications
Purdue University 		...!ihnp4!pur-ee!pc-ecn!sandersr

Let's make like a BSD process, and go FORK-OFF !!	-- bob
(and "make" a few children while we're at it ...)

ignatz@aicchi.UUCP (Ihnat) (08/08/86)

Two bits of information.  First, the August '86 Dr. Dobbs has a very good,
fairly comprehensive survey of the competetive 'C' compilers available
for MS-DOS; additionally, on Compuserve, they've provided 'electronic
updates' to compensate for 'publishing lag' (about two months) between
review and publishing.  Far too long to even paraphrase or summarize here,
it's one of the few 'C' reviews that I've seen that seems to use people
who aren't just familiar with (and thereby tout) one or two compilers,
and don't make blatantly incorrect statements about systems through a lack
of knowledge.  Although they don't fall into the trap of unequivocally
declaring any one compiler 'best for all things', it's obvious that Microsoft
4.0 is a big winner; as is IBM 'C' (Not surprising, as it's essentially
Microsoft 'C' repackaged by Big (bumbling) Blue).

In all the hooraw, I'm surprised that no one has mentioned Aztec 'C', especially
the Commercial Development system.  Although it's got shortcomings, it's
quite Unix compatible, and comes with quite a spread of libraries and memory
models (AND you get the complete source to all library routines!), as well
as providing a rather nice Unix-ish development environment; things such
as grep, make, 'z', diff, and a fistful of other utilities.  In addition,
the assembler is complete enough to use in it's own right, and you can
also generate ROMable code.  For the price, quite reasonable; and it shows
acceptably in the Dr. Dobb's survey.

Dr. Dobbs also indicates that High 'C', Wizard 'C', and Datalight 'C'
are also worth checking out, depending on your needs.  Also keep in mind
that an outfit in, I believe, Canada, is offering quite a suite of Unix
tools for MS-DOS for only about $50 US.

-- 
	Dave Ihnat
	Analysts International Corporation
	(312) 882-4673
	ihnp4!aicchi!ignatz || ihnp4!homebru!ignatz

randy@chinet.UUCP (randy) (08/09/86)

In article <783@aicchi.UUCP> ignatz@aicchi.UUCP (Ihnat) writes:
>Also keep in mind
>that an outfit in, I believe, Canada, is offering quite a suite of Unix
>tools for MS-DOS for only about $50 US.
>
	That's "MKS Toolkit" by Mortice Kern Systems
				53 Bridgeport Road East
				Waterloo, Ontario
				Canada NJ2 2J4
				519 884 2251
	
	Highly recommended!  Comes with awk, cpio, cut, paste, cp, tail,
	strings and most of the applicable tools that would work on msdos.
	awk, find, and cpio are specially nice for transfering directory
	hierarchies from one hard disk to another.

	I think I paid about $140 for it and received it about 4 days after
	placing my order.
	(release 1.4)

-- 
.. that's the biz, sweetheart...
Randy Suess
chinet - Public Access UN*X
(312) 545 7535 (h) (312) 283 0559 (system)
..!ihnp4!chinet!randy