diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/doc/languages.texi | |
download | cbb-gcc-4.6.4-upstream.tar.bz2 cbb-gcc-4.6.4-upstream.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/doc/languages.texi')
-rw-r--r-- | gcc/doc/languages.texi | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/doc/languages.texi b/gcc/doc/languages.texi new file mode 100644 index 000000000..df45c1778 --- /dev/null +++ b/gcc/doc/languages.texi @@ -0,0 +1,36 @@ +@c Copyright (C) 2002, 2010 Free Software Foundation, Inc. +@c This is part of the GCC manual. +@c For copying conditions, see the file gcc.texi. + +@node Languages +@chapter Language Front Ends in GCC + +The interface to front ends for languages in GCC, and in particular +the @code{tree} structure (@pxref{GENERIC}), was initially designed for +C, and many aspects of it are still somewhat biased towards C and +C-like languages. It is, however, reasonably well suited to other +procedural languages, and front ends for many such languages have been +written for GCC@. + +Writing a compiler as a front end for GCC, rather than compiling +directly to assembler or generating C code which is then compiled by +GCC, has several advantages: + +@itemize @bullet +@item GCC front ends benefit from the support for many different +target machines already present in GCC@. +@item GCC front ends benefit from all the optimizations in GCC@. Some +of these, such as alias analysis, may work better when GCC is +compiling directly from source code then when it is compiling from +generated C code. +@item Better debugging information is generated when compiling +directly from source code than when going via intermediate generated C +code. +@end itemize + +Because of the advantages of writing a compiler as a GCC front end, +GCC front ends have also been created for languages very different +from those for which GCC was designed, such as the declarative +logic/functional language Mercury. For these reasons, it may also be +useful to implement compilers created for specialized purposes (for +example, as part of a research project) as GCC front ends. |