GCC Front Ends
Currently the main GCC distribution contains front ends for C
(gcc), C++ (g++), Objective C,
Fortran, Ada (GNAT), Go, and D.
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
are very mature.
- GNU Pascal Compiler (GPC).
- Mercury,
a declarative logic/functional language. The University of Melbourne Mercury
compiler is written in Mercury; originally it compiled via C but now it also
has a back end that generates assembler directly, using the GCC back end.
- Cobol For GCC
(at an early stage of development).
- GNU Modula-2 implements
the ISO/IEC 10514-1, PIM2, PIM3 and PIM4 dialects of the language.
The compiler is operational with GCC 10, GCC 11, and GCC 12 (on
GNU/Linux x86 systems). The front end was merged into the GCC tree
during GCC 13. It is mostly written in Modula-2 and includes a
bootstrap tool which translates Modula-2 into C/C++.
- Modula-3 (for links see www.modula3.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.
- GHDL is a GCC front end for the
VHDL (IEEE 1076) hardware design language. GHDL and its runtime library
are written in Ada95 using GNAT and are distributed under the GPL.
Currently they only support GNU/Linux x86 systems.
- PL/1 for GCC is a
GCC front end for the PL/I language.
- GCC Unified Parallel C
(GCC UPC) is a compilation and execution environment for Unified
Parallel C.