Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

144 lines
6.3KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>G++ and GCC (Using the GNU Compiler Collection (GCC))</title>
  21. <meta name="description" content="G++ and GCC (Using the GNU Compiler Collection (GCC))">
  22. <meta name="keywords" content="G++ and GCC (Using the GNU Compiler Collection (GCC))">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="index.html#Top" rel="up" title="Top">
  30. <link href="Standards.html#Standards" rel="next" title="Standards">
  31. <link href="index.html#Top" rel="prev" title="Top">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style: oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="G_002b_002b-and-GCC"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="Standards.html#Standards" accesskey="n" rel="next">Standards</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  65. </div>
  66. <hr>
  67. <a name="Programming-Languages-Supported-by-GCC"></a>
  68. <h2 class="chapter">1 Programming Languages Supported by GCC</h2>
  69. <a name="index-GCC"></a>
  70. <a name="index-GNU-Compiler-Collection"></a>
  71. <a name="index-GNU-C-Compiler"></a>
  72. <a name="index-Ada"></a>
  73. <a name="index-D"></a>
  74. <a name="index-Fortran"></a>
  75. <a name="index-Go"></a>
  76. <a name="index-Objective_002dC"></a>
  77. <a name="index-Objective_002dC_002b_002b"></a>
  78. <p>GCC stands for &ldquo;GNU Compiler Collection&rdquo;. GCC is an integrated
  79. distribution of compilers for several major programming languages. These
  80. languages currently include C, C++, Objective-C, Objective-C++,
  81. Fortran, Ada, D, Go, and BRIG (HSAIL).
  82. </p>
  83. <p>The abbreviation <em>GCC</em> has multiple meanings in common use. The
  84. current official meaning is &ldquo;GNU Compiler Collection&rdquo;, which refers
  85. generically to the complete suite of tools. The name historically stood
  86. for &ldquo;GNU C Compiler&rdquo;, and this usage is still common when the emphasis
  87. is on compiling C programs. Finally, the name is also used when speaking
  88. of the <em>language-independent</em> component of GCC: code shared among the
  89. compilers for all supported languages.
  90. </p>
  91. <p>The language-independent component of GCC includes the majority of the
  92. optimizers, as well as the &ldquo;back ends&rdquo; that generate machine code for
  93. various processors.
  94. </p>
  95. <a name="index-COBOL"></a>
  96. <a name="index-Mercury"></a>
  97. <p>The part of a compiler that is specific to a particular language is
  98. called the &ldquo;front end&rdquo;. In addition to the front ends that are
  99. integrated components of GCC, there are several other front ends that
  100. are maintained separately. These support languages such as
  101. Mercury, and COBOL. To use these, they must be built together with
  102. GCC proper.
  103. </p>
  104. <a name="index-C_002b_002b"></a>
  105. <a name="index-G_002b_002b"></a>
  106. <a name="index-Ada-1"></a>
  107. <a name="index-GNAT"></a>
  108. <p>Most of the compilers for languages other than C have their own names.
  109. The C++ compiler is G++, the Ada compiler is GNAT, and so on. When we
  110. talk about compiling one of those languages, we might refer to that
  111. compiler by its own name, or as GCC. Either is correct.
  112. </p>
  113. <a name="index-compiler-compared-to-C_002b_002b-preprocessor"></a>
  114. <a name="index-intermediate-C-version_002c-nonexistent"></a>
  115. <a name="index-C-intermediate-output_002c-nonexistent"></a>
  116. <p>Historically, compilers for many languages, including C++ and Fortran,
  117. have been implemented as &ldquo;preprocessors&rdquo; which emit another high
  118. level language such as C. None of the compilers included in GCC are
  119. implemented this way; they all generate machine code directly. This
  120. sort of preprocessor should not be confused with the <em>C
  121. preprocessor</em>, which is an integral feature of the C, C++, Objective-C
  122. and Objective-C++ languages.
  123. </p>
  124. <hr>
  125. <div class="header">
  126. <p>
  127. Next: <a href="Standards.html#Standards" accesskey="n" rel="next">Standards</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  128. </div>
  129. </body>
  130. </html>