Next:Source Tree Structure and Build System, Previous:The GCC low-level runtime library, Up:Introduction [Contents][Index]
The interface to front ends for languages in GCC, and in particularthetree structure (seeGENERIC), was initially designed forC, and many aspects of it are still somewhat biased towards C andC-like languages. It is, however, reasonably well suited to otherprocedural languages, and front ends for many such languages have beenwritten for GCC.
Writing a compiler as a front end for GCC, rather than compilingdirectly to assembler or generating C code which is then compiled byGCC, has several advantages:
Because of the advantages of writing a compiler as a GCC front end,GCC front ends have also been created for languages very differentfrom those for which GCC was designed, such as the declarativelogic/functional language Mercury. For these reasons, it may also beuseful to implement compilers created for specialized purposes (forexample, as part of a research project) as GCC front ends.cc Copyright (C) 2002-2026 Free Software Foundation, Inc.