Re: Compiling to C (where C is used as misspelled assembly)

David Chase <chase@world.std.com>
16 May 1997 23:38:07 -0400

          From comp.compilers

Related articles
Compiling to C (where C is used as misspelled assembly) bear@sonic.net (Ray Dillinger) (1997-05-14)
Re: Compiling to C (where C is used as misspelled assembly) fabre@gr.osf.org (Christian Fabre) (1997-05-16)
Re: Compiling to C (where C is used as misspelled assembly) fjh@mundook.cs.mu.OZ.AU (1997-05-16)
Re: Compiling to C (where C is used as misspelled assembly) chase@world.std.com (David Chase) (1997-05-16)
Re: Compiling to C (where C is used as misspelled assembly) darius@phidani.be (Darius Blasband) (1997-05-16)
Re: Compiling to C (where C is used as misspelled assembly) hbaker@netcom.com (1997-05-16)
Re: Compiling to C (where C is used as misspelled assembly) ramb@spring.epic.com (Ram Bhamidipaty) (1997-05-16)
Re: Compiling to C (where C is used as misspelled assembly) dwight@pentasoft.com (Dwight VandenBerghe) (1997-05-16)
Re: Compiling to C (where C is used as misspelled assembly) conway@mundook.cs.mu.OZ.AU (1997-05-17)
Re: Compiling to C (where C is used as misspelled assembly) fjh@mundook.cs.mu.OZ.AU (1997-05-17)
[8 later articles]
| List of all articles for this month |

From: David Chase <chase@world.std.com>
Newsgroups: comp.compilers
Date: 16 May 1997 23:38:07 -0400
Organization: Compilers Central
References: 97-05-183
Keywords: C, assembler

Ray Dillinger wrote:
> I've been looking for a good target language for compilation;


> And, I think a lobotomized subset of C does what I want. I can write
> this kind of pseudo-machine code in C, with a honking huge main()
> routine, global variables for the registers, etc.


> However, this will violate every "reasonable" assumption a maker of C
> compiers will have about programming style.


> Will modern C systems handle this?


> [Probably not. Machine generated source code always seems to break
> compilers designed for code written by humans. -John]


I'd say, give it a try, but bend over backwards to generate
Ansi-compliant C, then you can try to get the largest and most ugly of
the codes your "compiler" generates incorporated into an
"industry-standard benchmark". I'm not quite so pessimistic as our
Esteemed Moderator; I think that some compilers will accept it, some
will not, and there is great fun to be had if you can point out the
less-capable compiler vendors. C is also not the greatest assembly
language in the world, though convergence to the Ansi standard has
improved things very much since 1990 (when I wrote a Modula3- to-C
code generator).


One experiment you might try, before you commit huge amounts of
intellectual effort to this, is to write a simple huge-program-
generator, and try it out with a few different compilers.


David
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.