📄 g---and-gcc.html
字号:
<html lang="en">
<head>
<title>Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.3">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
<!--
Copyright © 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
<p>Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "GNU General Public License" and "Funding
Free Software", the Front-Cover texts being (a) (see below), and with
the Back-Cover Texts being (b) (see below). A copy of the license is
included in the section entitled "GNU Free Documentation License".
<p>(a) The FSF's Front-Cover Text is:
<p>A GNU Manual
<p>(b) The FSF's Back-Cover Text is:
<p>You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
</head>
<body>
<h1 class="settitle">Using the GNU Compiler Collection (GCC)</h1>
<div class="node">
<p>
Node:<a name="G++%20and%20GCC">G++ and GCC</a>,
Next:<a rel="next" accesskey="n" href="Standards.html#Standards">Standards</a>,
Previous:<a rel="previous" accesskey="p" href="index.html#Top">Top</a>,
Up:<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr><br>
</div>
<h2 class="chapter">Compile C, C++, Objective-C, Ada, Fortran, Java, or treelang</h2>
<p>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 these
languages. The Ada, Fortran, Java and treelang compilers are described in
separate manuals.
<p>"GCC" is a common shorthand term for the GNU Compiler Collection. This is both
the most general name for the compiler, and the name used when the
emphasis is on compiling C programs (as the abbreviation formerly
stood for "GNU C Compiler").
<p>When referring to C++ compilation, it is usual to call the compiler
"G++". Since there is only one compiler, it is also accurate to call
it "GCC" no matter what the language context; however, the term
"G++" is more useful when the emphasis is on compiling C++ programs.
<p>Similarly, when we talk about Ada compilation, we usually call the
compiler "GNAT", for the same reasons.
<p>We use the name "GCC" to refer to the compilation system as a
whole, and more specifically to the language-independent part of the
compiler. For example, we refer to the optimization options as
affecting the behavior of "GCC" or sometimes just "the compiler".
<p>Front ends for other languages, such as Mercury and Pascal exist but
have 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 an
integrated compiler that can compile programs written in C, C++,
Objective-C, or any of the languages for which you have installed front
ends.
<p>In this manual, we only discuss the options for the C, Objective-C, and
C++ compilers and those of the GCC core. Consult the documentation
of the other front ends for the options to use when compiling programs
written in other languages.
<p>G++ is a <em>compiler</em>, not merely a preprocessor. G++ builds object
code directly from your C++ program source. There is no intermediate C
version of the program. (By contrast, for example, some other
implementations use a program that generates a C program from your C++
source.) Avoiding an intermediate C representation of the program means
that you get better object code, and better debugging information. The
GNU debugger, GDB, works with this information in the object code to
give you comprehensive C++ source-level editing capabilities
(see <a href="../gdb.info/C.html#C">C and C++</a>).
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -