|Best "simple" C Compiler I've ever seen firstname.lastname@example.org (2014-05-04)|
|How to type braces for computed gotos (was: Best "simple" C Compiler I email@example.com (2014-07-18)|
|Re: How to type braces for computed gotos firstname.lastname@example.org (glen herrmannsfeldt) (2014-07-19)|
|Re: How to type braces for computed gotos email@example.com (Ivan Godard) (2014-07-18)|
|Re: How to type braces for computed gotos (was: Best "simple" C Compil firstname.lastname@example.org (2014-07-21)|
|Re: How to type braces for computed gotos email@example.com (glen herrmannsfeldt) (2014-07-21)|
|Re: How to type braces for computed gotos firstname.lastname@example.org (2014-07-21)|
|Re: How to type braces for computed gotos email@example.com (2014-07-21)|
|[3 later articles]|
|Date:||Fri, 18 Jul 2014 14:44:04 -0700 (PDT)|
|Posted-Date:||18 Jul 2014 21:22:52 EDT|
On Sunday, May 4, 2014 8:23:05 PM UTC-5, andrewc...@gmail.com wrote:
> Self hosting, extremely well written, and seems geared towards simple
> but complete code rather than being a complicated monolith.
On that count: usually when I redo a source (reformat, reanalyze the math,
make more effective use of the language, etc.) it comes out to 50% reduction
by lines 30% by bytes; which is consistent across thousands of source files.
The only exceptions I've encountered to date are stuff I earlier reduced (30%
by lines if it made use of an earlier dialect of the language), stuff from
AT&T (which does not reduce much, e.g. CFront) and the source for this
So by that count, it's well-written and compact.
There is one feature the compiler tests for that I assume the language also
has in it that I haven't seen much of before: the computed goto. What's I
don't quite understand how the branches are being typed. A computed goto
inside a void routine has the branches typed (void *), with the individual
items accessed in effect as references to (void *).
The branches are essentially continuations. So the question here is how are
continuations being typed. From the example used in the distribution, either
(A) all continuations are typed (void *) or they are being typed (T *) when
they occur inside a function that returns type T.
[That's an extension. In standard C, you can only goto a label. -John
Perhaps it's similar to this GCC extension
Return to the
Search the comp.compilers archives again.