GCC Front-Ends
Currently the main GCC distribution contains front-ends for C
(gcc), C++ (g++), Objective C, Chill, Fortran (g77), and Java (GCJ). (Note that the Java
runtime library libgcj
is not yet included with the GCC
sources, but will be in GCC 3.0.)
There are several more front-ends for different languages that have
been written for GCC but not yet integrated into the main distribution
of the GNU Compiler Collection. Some of these may be integrated in
future; others may not, for various reasons.
Example front-ends for toy languages and guidance on writing
front-ends are listed along with other links
and readings. The source files tree.h
and
tree.def
are the key ones to be familiar with.
Some of these front-ends are very much works in progress; others,
such as GNAT, are very mature.
- The GNU Ada Translator (GNAT): Ada
Core Technologies, sources and binaries, Ada for Linux Team. This
front-end is written in Ada.
- GNU
Pascal Compiler (GPC).
- Cobol For GCC
(at an early stage of development).
- G95 (Fortran 95; at an
early stage of development).
- GNU
Modula-2 (in development). This compiler is mostly written in
Modula-2, but includes a bootstrap procedure via a modified version of
p2c.
- Modula-3 (for links see www.m3.org); SRC M3 is based on an old
version of GCC and PM3 and CAM3 derive from SRC M3. This compiler is
written in Modula-3; for copyright and licensing reasons neither the
small amount of C code that links to GCC and provides the interface to
the back end, nor the front-end proper, is likely to be integrated in
GCC, nor is the front-end likely to change to a more normal interface
of linking directly to the back end.