]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/gcc/doc/frontends.texi
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / gcc / doc / frontends.texi
1 @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2 @c 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
3 @c This is part of the GCC manual.
4 @c For copying conditions, see the file gcc.texi.
5
6 @node G++ and GCC
7 @chapter Programming Languages Supported by GCC
8
9 @cindex GCC
10 @cindex GNU Compiler Collection
11 @cindex GNU C Compiler
12 @cindex Ada
13 @cindex Fortran
14 @cindex Java
15 @cindex treelang
16 GCC stands for ``GNU Compiler Collection''.  GCC is an integrated
17 distribution of compilers for several major programming languages.  These
18 languages currently include C, C++, Java, Fortran, and Ada.
19
20 The abbreviation @dfn{GCC} has multiple meanings in common use.  The
21 current official meaning is ``GNU Compiler Collection'', which refers
22 generically to the complete suite of tools.  The name historically stood
23 for ``GNU C Compiler'', and this usage is still common when the emphasis
24 is on compiling C programs.  Finally, the name is also used when speaking
25 of the @dfn{language-independent} component of GCC: code shared among the
26 compilers for all supported languages.
27
28 The language-independent component of GCC includes the majority of the
29 optimizers, as well as the ``back ends'' that generate machine code for
30 various processors.
31
32 @cindex COBOL
33 @cindex Mercury
34 @cindex Pascal
35 The part of a compiler that is specific to a particular language is
36 called the ``front end''.  In addition to the front ends that are
37 integrated components of GCC, there are several other front ends that
38 are maintained separately.  These support languages such as Pascal,
39 Mercury, and COBOL@.  To use these, they must be built together with
40 GCC proper.
41
42 @cindex C++
43 @cindex G++
44 @cindex Ada
45 @cindex GNAT
46 Most of the compilers for languages other than C have their own names.
47 The C++ compiler is G++, the Ada compiler is GNAT, and so on.  When we
48 talk about compiling one of those languages, we might refer to that
49 compiler by its own name, or as GCC@.  Either is correct.
50
51 @cindex compiler compared to C++ preprocessor
52 @cindex intermediate C version, nonexistent
53 @cindex C intermediate output, nonexistent
54 Historically, compilers for many languages, including C++ and Fortran,
55 have been implemented as ``preprocessors'' which emit another high
56 level language such as C@.  None of the compilers included in GCC are
57 implemented this way; they all generate machine code directly.  This
58 sort of preprocessor should not be confused with the @dfn{C
59 preprocessor}, which is an integral feature of the C and C++ languages.