Programming Languages Supported by GCC(GCC 支持的编程语言)

来源:互联网 发布:python 获取日期 编辑:程序博客网 时间:2024/06/06 14:11

Using the GNU Compiler Collection

1. Programming Languages Supported by GCC

GCC 支持的编程语言

GCC stands for “GNU Compiler Collection”.

GCC 全称 “GNU Compiler Collection ( GNU 编译器工具集 )”

GCC is an integrated distribution of compilers for several major programming languages.

GCC 是数个主流编程语言的集成编译工具集

These languages currently include C, C++, Objective-C, Objective-C++, Fortran, Ada, Go, and BRIG (HSAIL).

当前支持的语言包括 C, C++, Objective-C, Objective-C++, Fortran, Ada, Go 和 BRIG (HSAIL).

The abbreviation GCC has multiple meanings in common use.

GCC 这个缩写通常有多种含义

The current ofcial meaning is “GNU Compiler Collection”, which refers generically to the complete suite of tools.

现在的官方含义是”GNU 编译器工具集”, 一般指完整的工具套件

The name historically stood for “GNU C Compiler”, and this usage is still common when
the emphasis is on compiling C programs.

历史上也称 GCC 为 “GNU C 编译器”, 当强调编译 C 程序时这种用法仍然是常见的

Finally, the name is also used when speaking
of the language-independent component of GCC: code shared among the compilers for all
supported languages.

最后一种含义,GCC 也被用于指代它的独立于语言的组件: 编译器所支持全部语言的共有代码部分

The language-independent component of GCC includes the majority of the optimizers,
as well as the “back ends” that generate machine code for various processors.

GCC 独立于语言的组件包括大多数的优化器以及为不同处理器生成机器码的”后端

The part of a compiler that is specifc to a particular language is called the “front end”.

编译器具体到一个特定的语言部分被称为 前端

In addition to the front ends that are integrated components of GCC, there are several
other front ends that are maintained separately.

此外, 前端 是 GCC 的集成组件,但是也有几个分别维护的 前端

These support languages such as Pascal, Mercury, and COBOL.

比如 Pascal, Mercury 和 COBOL 的前端

To use these, they must be built together with GCC proper.

使用的前提是它们必须与 GCC 一起构建

Most of the compilers for languages other than C have their own names.

除 C 语言以外的大部分其他语言编译器都有自己的名字

The C++ compiler is G++, the Ada compiler is GNAT, and so on.

比如 C++ 的编译器是 G++, Ada 的编译器是 GNAT 等等

When we talk about compiling one of those languages, we might refer to that compiler by its own name, or as GCC. Either is correct.

当我们谈论这些语言中的某一种语言编译的时候,我们可以提及该语言编译器自己的名字或者说 GCC 也是正确的

Historically, compilers for many languages, including C++ and Fortran, have been implemented as “preprocessors” which emit another high level language such as C.

历史上,有些编译器为许多语言,包括 C++ 和 Fortran, 实现了像 C 这种高级语言的预处理器

None of the compilers included in GCC are implemented this way;

但GCC中包含的编译器都没有这样实现;

they all generate machine code directly.

他们都是直接生成机器码

This sort of preprocessor should not be confused with the C preprocessor, which is an integral feature of the C, C++, Objective-C and Objective-C++ languages.

这种预处理器不应该与C的预处理器混淆,C的预处理器是C,C++,Objective-C 和 Objective-C++ 语言的一个完整特性。


关于对GCC的前端和后端的理解可查看上一篇文章中的 GCC Front End 部分
http://blog.csdn.net/letshi/article/details/70332292

0 0