[net.micro] Microsoft C

KRULWICH@C.CS.CMU.EDU (Bruce Krulwich) (09/17/86)

I am interested in any comments on the microsoft C compiler version 4.0,
dealing with the generated code, the debugger, 8087 support, environment,
etc.  quick mail responses would be nice as my project will be making
a purchase within a day or two.

thanks in advance.

bruce krulwich

arpa: krulwich@c.cs.cmu.edu
bitnet: bk0a%tc.cc.cmu.edu@cmccvma
uucp: ... seismo!... or ...ucbvax!...
	!c.cs.cmu.edu!krulwich

colin@vu-vlsi.UUCP (Colin Kelley) (09/23/86)

I strongly recommend Microsoft C.  I had the displeasure this summer of
attempting to port a major C program to a PC using Lattice C 3.0.  I was
hampered by 64k limits all over the place, as well as bugs in their malloc().
Things really improved when Microsoft C 4.0 arrived about a month ago.  It
has all the same flexibility in memory models (small or large code, small or
large data) plus one _major_ improvement:  the ability to declare arrays as
'huge'.  These arrays are allowed to be up to 128K, and even larger if you're
willing to make the sizeof(each element) equal to a power of two.  For my
application, a function plotting program, making a single array 'huge' allowed
twice as many functions to be plotted.

The 8087 support is great, as it semmed to be in Lattice also.  I notice about
a 10x speed improvement when running my program with an 8087.  The 8087 is
used automatically if it's there...

The Lattice C library is very good, but MSC's is a little better.  Both score
very high in Unix compatibility, but MSC has support for many more of the
Unix #include files.

The code generated by MSC is also excellent.  I wanted to hand-optimize the
assembly language generated for an implementation of the Bresenham line
plotting algorithm, but it was unnecessary--the code MSC generated was
better optimized than I could do!  The only area I could improve was in
register allocation; MSC only allows two register variables.  But then again,
Lattice doesn't allow any.

As far as documentation, Microsoft absolutely blows Lattice away.  I was
really disgusted that Lattice distributed the manual for version 2.0 along
with a separate 3.0 addendum.  Much of what is documented in the 2.0 manual
is wrong; you must read the 3.0 addendum and make mental notes of what
changed.  And when I had to refer back to the manuals, I was completely lost.
Microsoft's manuals are top-notch...

MSC also comes with CodeView and MAKE.  CodeView is an excellent full-screen
source code debugger.  I never thought I'd see a PC debugger as good as 
DbxTool (on Sun workstations), but CodeView is.  See the free CodeView demo...
And MAKE is a necessity for large projects.  I was disappointed that
Microsoft's MAKE isn't as smart as the Unix Make.  I had to change my Unix
Makefiles to be more verbose to be used with Microsoft's MAKE.  You may be
better off using the public domain PC MAKE...

In summary, I think Microsoft C 4.0 is the best PC C compiler available, and
its ~$250 discounted price is probably as good as anyone's, when you consider
that it comes with both MAKE and CodeView...Be warned that MSC is pretty slow
at compiling though, particulary with the optimizer turned on (the default).
I've been fortunate to be using it on an 8 MHz Zenith AT clone...

I have no connection with Microsoft.  I'm just a satisfied customer, honest!

			-Colin Kelley ..{cbmvax,pyrnj,psuvax1}!vu-vlsi!colin