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