|Why Can't We Build a C Compiler? firstname.lastname@example.org (1988-12-18)|
|Re: Why Can't We Build a C Compiler? email@example.com (1988-12-19)|
|Re: Why Can't We Build a C Compiler? firstname.lastname@example.org (1988-12-21)|
|Re: Why Can't We Build a C Compiler? email@example.com (1988-12-21)|
|Re: Why Can't We Build a C Compiler? firstname.lastname@example.org (Nick Rothwell) (1988-12-20)|
|Re: Why Can't We Build a C Compiler? email@example.com (1988-12-23)|
|Re: Why Can't We Build a C Compiler? firstname.lastname@example.org (1988-12-26)|
|Re: Why Can't We Build a C Compiler? olender@rachmaninov.CS.ColoState.EDU (1988-12-28)|
|Re: Why Can't We Build a C Compiler? email@example.com (Frode Odegard) (1988-12-29)|
|Re: Why Can't We Build a C Compiler? firstname.lastname@example.org (1989-01-05)|
|Why can't we build a C compiler? think!compass!worley@EDDIE.MIT.EDU (1988-12-19)|
|Re: Why Can't We Build a C Compiler? email@example.com (1989-01-03)|
|[4 later articles]|
|Date:||23 Dec 88 19:23:05 GMT|
|From:||firstname.lastname@example.org (Sean Fagan)|
|Organization:||The Santa Cruz Operation, Inc.|
In article <email@example.com> firstname.lastname@example.org (Scott Guthery) writes:
>And yet I claim there does not exist a compiler for
>the C programming language. There are a lot of programs that are close but
>close shouldn't count. Every program I know of which calls itself a C
>compiler is at curent version level greater than 1.00 and will correct a
>couple more bugs in the next release.
Because people like to put in little features, extend it in various ways,
get it to do more and better things. Code generation is still an art, not
a science, and one man's code generation algorithm might be another man's
pcc does a *real* good job, if you don't allow the optimizer to get in. It
also is one of the least-featured compilers around. Small C generates
more-or-less bug-free code for the subset it works with. Microsoft C, when
it actually generates code instead of getting an assert(*), usually
generates good code.
* I work on Microsoft C, and thus see more of the bugs than most other
people do. Yes, there are some constructs *guaranteed* to get an assert or
core-dump in the current version, and yes, we do try to get rid of them. It
is still a decent compiler, generates good code, given the machine it's
generating for, and I like it. End of comment 8-).
A non-featured C compiler doesn't have much of a chance any more. It either
has to be faster, or generate better code, or have its own little
enhancements, or the writers feel it won't sell. Each of these introduces a
larger possibility of error.
Now, flame time:
You think it's easy? Fine, you write a nice, dpANSI-conformat C compiler,
and make sure it has *no* bugs. Then, you try to sell it for the amount
you'll need to recover the costs you spent developing it. It ain't easy,
buddy. Nor is it fun.
Sean Eric Fagan | "Merry Christmas, drive carefully and have some great sex."
seanf@sco.UUCP | -- Art Hoppe
(408) 458-1422 | Any opinions expressed are my own, not my employers'.
[I suppose that pcc does a good job at generating correct code, but it
does such a bad job of generating good code that I gather that fewer and
fewer Unices still use it, except perhaps in heavily modified form. And
nobody said it was easy, the original question was (more or less) why is
it so hard? But I don't understand why Microsoft still refuses to give
out their compiler bug list. It's extremely annoying to call them to report
a bug only to be told that they alreay know about it but there's no way I
could have known that. Thanks a lot. -John]
Return to the
Search the comp.compilers archives again.