re: Adding other languages to GCC

David.Chase@Eng.Sun.COM (David Chase)
Fri, 5 Feb 1993 19:17:43 GMT

          From comp.compilers

Related articles
GCC as back-end summary davids@ICSI.Berkeley.EDU (1993-01-29)
Adding other languages to GCC (was, using GCC for back-end)] (1993-02-04)
re: Adding other languages to GCC David.Chase@Eng.Sun.COM (1993-02-05)
Re: Adding other languages to GCC (1993-02-07)
| List of all articles for this month |

Newsgroups: comp.compilers
From: David.Chase@Eng.Sun.COM (David Chase)
Keywords: GCC
Organization: Compilers Central
References: 93-02-011 93-02-050
Date: Fri, 5 Feb 1993 19:17:43 GMT

I studied this once, around about gcc 1.2x. One caveat that RMS did not
provide is that if your language has substantially different features from
C -- for instance, nested functions, or garbage collection, or closures,
or continuations -- then the rest of the back-end may not "correctly"
generate the code that you want. That is, it was designed (and so far,
tested) for languages like C. Fortran shouldn't be hard to compile (once
you parse it, and never mind the IO libraries), and with a little hackery
Pascal and Modula-2 should also fall out. However, using GCC as a backend
for Scheme might be a tall order, and it is my understanding that it has
taken a lot of work to make the optimizer in GCC GC-aware for Modula-3.

I once tried to write some documentation for the tree data structures. It
is almost certainly obsolete now. The trees were pretty easy to figure
out, but (another warning) watch out for those places where trees are NOT
used as the intermediate data structure (I recall that 1.x would generate
the function prologue and epilogue more or less directly without going
through the trees). Perhaps this has been cleaned up in 2.x.


Post a followup to this message

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