1 @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2 @c 1999, 2000, 2001 Free Software Foundation, Inc.
3 @c This is part of the GCC manual.
4 @c For copying conditions, see the file gcc.texi.
7 @chapter Compile C, C++, Objective-C, Ada, Fortran, Java, or treelang
14 Several versions of the compiler (C, C++, Objective-C, Ada,
15 Fortran, Java and treelang) are integrated; this is why we use the name
16 ``GNU Compiler Collection''. GCC can compile programs written in any of these
17 languages. The Ada, Fortran, Java and treelang compilers are described in
21 ``GCC'' is a common shorthand term for the GNU Compiler Collection. This is both
22 the most general name for the compiler, and the name used when the
23 emphasis is on compiling C programs (as the abbreviation formerly
24 stood for ``GNU C Compiler'').
28 When referring to C++ compilation, it is usual to call the compiler
29 ``G++''. Since there is only one compiler, it is also accurate to call
30 it ``GCC'' no matter what the language context; however, the term
31 ``G++'' is more useful when the emphasis is on compiling C++ programs.
35 Similarly, when we talk about Ada compilation, we usually call the
36 compiler ``GNAT'', for the same reasons.
38 We use the name ``GCC'' to refer to the compilation system as a
39 whole, and more specifically to the language-independent part of the
40 compiler. For example, we refer to the optimization options as
41 affecting the behavior of ``GCC'' or sometimes just ``the compiler''.
43 Front ends for other languages, such as Mercury and Pascal exist but
44 have not yet been integrated into GCC@. These front ends, like that for C++,
45 are built in subdirectories of GCC and link to it. The result is an
46 integrated compiler that can compile programs written in C, C++,
47 Objective-C, or any of the languages for which you have installed front
50 In this manual, we only discuss the options for the C, Objective-C, and
51 C++ compilers and those of the GCC core. Consult the documentation
52 of the other front ends for the options to use when compiling programs
53 written in other languages.
55 @cindex compiler compared to C++ preprocessor
56 @cindex intermediate C version, nonexistent
57 @cindex C intermediate output, nonexistent
58 G++ is a @emph{compiler}, not merely a preprocessor. G++ builds object
59 code directly from your C++ program source. There is no intermediate C
60 version of the program. (By contrast, for example, some other
61 implementations use a program that generates a C program from your C++
62 source.) Avoiding an intermediate C representation of the program means
63 that you get better object code, and better debugging information. The
64 GNU debugger, GDB, works with this information in the object code to
65 give you comprehensive C++ source-level editing capabilities
66 (@pxref{C,,C and C++,gdb.info, Debugging with GDB}).
68 @c FIXME! Someone who knows something about Objective-C ought to put in
69 @c a paragraph or two about it here, and move the index entry down when
70 @c there is more to point to than the general mention in the 1st par.