1 Compile C, C++, Objective-C, Ada, Fortran, Java, or treelang
Several versions of the compiler (C, C++, Objective-C, Ada,Fortran, Java and treelang) are integrated; this is why we use the name“GNU Compiler Collection”. GCC can compile programs written in any of theselanguages. The Ada, Fortran, Java and treelang compilers are described inseparate manuals.
“GCC” is a common shorthand term for the GNU Compiler Collection. This is boththe most general name for the compiler, and the name used when theemphasis is on compiling C programs (as the abbreviation formerlystood for “GNU C Compiler”).
When referring to C++ compilation, it is usual to call the compiler“G++”. Since there is only one compiler, it is also accurate to callit “GCC” no matter what the language context; however, the term“G++” is more useful when the emphasis is on compiling C++ programs.
Similarly, when we talk about Ada compilation, we usually call thecompiler “GNAT”, for the same reasons.
We use the name “GCC” to refer to the compilation system as awhole, and more specifically to the language-independent part of thecompiler. For example, we refer to the optimization options asaffecting the behavior of “GCC” or sometimes just “the compiler”.
Front ends for other languages, such as Mercury and Pascal exist buthave not yet been integrated into GCC. These front ends, like that for C++,are built in subdirectories of GCC and link to it. The result is anintegrated compiler that can compile programs written in C, C++,Objective-C, or any of the languages for which you have installed frontends.
In this manual, we only discuss the options for the C, Objective-C, andC++ compilers and those of the GCC core. Consult the documentationof the other front ends for the options to use when compiling programswritten in other languages.
G++ is a compiler, not merely a preprocessor. G++ builds objectcode directly from your C++ program source. There is no intermediate Cversion of the program. (By contrast, for example, some otherimplementations use a program that generates a C program from your C++source.) Avoiding an intermediate C representation of the program meansthat you get better object code, and better debugging information. TheGNU debugger, GDB, works with this information in the object code togive you comprehensive C++ source-level editing capabilities(see C and C++).