aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/languages.texi
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2002-01-10 16:04:23 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2002-01-10 16:04:23 +0000
commit0a553c7e1853074ee0616f92ce6b749f389e547a (patch)
tree1b51c9c6d40a0aa3d4f51db20a7b7e22c18fbf6d /gcc/doc/languages.texi
parent195a5def1cd526aa9160c33f54d9c4103d01dd79 (diff)
downloadgcc-0a553c7e1853074ee0616f92ce6b749f389e547a.zip
gcc-0a553c7e1853074ee0616f92ce6b749f389e547a.tar.gz
gcc-0a553c7e1853074ee0616f92ce6b749f389e547a.tar.bz2
Makefile.in ($(docdir)/gccint.info, gccint.dvi): Add additional dependencies.
* Makefile.in ($(docdir)/gccint.info, gccint.dvi): Add additional dependencies. * doc/languages.texi, doc/sourcebuild.texi: New files. * doc/configfiles.texi: Make a subsubsection. Update. * doc/configterms.texi: Add @node. Remove warning that this isn't instructions for building GCC. * doc/makefile.texi: Make a subsection. * doc/gccint.texi: Update. From-SVN: r48731
Diffstat (limited to 'gcc/doc/languages.texi')
-rw-r--r--gcc/doc/languages.texi36
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/doc/languages.texi b/gcc/doc/languages.texi
new file mode 100644
index 0000000..514cb08
--- /dev/null
+++ b/gcc/doc/languages.texi
@@ -0,0 +1,36 @@
+@c Copyright (C) 2002 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{Trees}), 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.