Skip to content

Commit 062d98b

Browse files
mudongliangJonathan Corbet
authored andcommitted
docs/zh_CN: update the translation of process/programming-language.rst
Update to commit 0b02076 ("docs: programming-language: add Rust programming language section") scripts/checktransupdate.py reports: Documentation/translations/zh_CN/process/programming-language.rst commit 0b02076 ("docs: programming-language: add Rust programming language section") commit 38484a1 ("docs: programming-language: remove mention of the Intel compiler") 2 commits needs resolving in total Signed-off-by: Dongliang Mu <[email protected]> Reviewed-by: Alex Shi <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Message-ID: <[email protected]>
1 parent 20e845d commit 062d98b

File tree

1 file changed

+30
-48
lines changed

1 file changed

+30
-48
lines changed

Documentation/translations/zh_CN/process/programming-language.rst

Lines changed: 30 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,22 @@
33
:Original: :ref:`Documentation/process/programming-language.rst <programming_language>`
44
:Translator: Alex Shi <[email protected]>
55

6-
.. _cn_programming_language:
7-
86
程序设计语言
97
============
108

11-
内核是用C语言 :ref:`c-language <cn_c-language>` 编写的。更准确地说,内核通常是用 :ref:`gcc <cn_gcc>`
12-
``-std=gnu11`` :ref:`gcc-c-dialect-options <cn_gcc-c-dialect-options>` 下编译的:ISO C11的 GNU 方言
13-
14-
这种方言包含对语言 :ref:`gnu-extensions <cn_gnu-extensions>` 的许多扩展,当然,它们许多都在内核中使用
9+
内核是用 C 编程语言编写的 [zh_cn_c-language]_。更准确地说,内核通常使用 ``gcc`` [zh_cn_gcc]_ 编译,
10+
并且使用 ``-std=gnu11`` [zh_cn_gcc-c-dialect-options]_:这是 ISO C11 的 GNU 方言
11+
``clang`` [zh_cn_clang]_ 也得到了支持,详见文档:
12+
:ref:`使用 Clang/LLVM 构建 Linux <kbuild_llvm>`
1513

16-
对于一些体系结构,有一些使用 :ref:`clang <cn_clang>` 和 :ref:`icc <cn_icc>` 编译内核
17-
的支持,尽管在编写此文档时还没有完成,仍需要第三方补丁。
14+
这种方言包含对 C 语言的许多扩展 [zh_cn_gnu-extensions]_,当然,它们许多都在内核中使用。
1815

1916
属性
2017
----
2118

22-
在整个内核中使用的一个常见扩展是属性(attributes) :ref:`gcc-attribute-syntax <cn_gcc-attribute-syntax>`
19+
在整个内核中使用的一个常见扩展是属性(attributes) [zh_cn_gcc-attribute-syntax]_。
2320
属性允许将实现定义的语义引入语言实体(如变量、函数或类型),而无需对语言进行
24-
重大的语法更改(例如添加新关键字) :ref:`n2049 <cn_n2049>`
21+
重大的语法更改(例如添加新关键字) [zh_cn_n2049]_。
2522

2623
在某些情况下,属性是可选的(即不支持这些属性的编译器仍然应该生成正确的代码,
2724
即使其速度较慢或执行的编译时检查/诊断次数不够)
@@ -30,42 +27,27 @@
3027
``__attribute__((__pure__))`` ),以检测可以使用哪些关键字和/或缩短代码, 具体
3128
请参阅 ``include/linux/compiler_attributes.h``
3229

33-
.. _cn_c-language:
34-
35-
c-language
36-
http://www.open-std.org/jtc1/sc22/wg14/www/standards
37-
38-
.. _cn_gcc:
39-
40-
gcc
41-
https://gcc.gnu.org
42-
43-
.. _cn_clang:
44-
45-
clang
46-
https://clang.llvm.org
47-
48-
.. _cn_icc:
49-
50-
icc
51-
https://software.intel.com/en-us/c-compilers
52-
53-
.. _cn_gcc-c-dialect-options:
54-
55-
c-dialect-options
56-
https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html
57-
58-
.. _cn_gnu-extensions:
59-
60-
gnu-extensions
61-
https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html
62-
63-
.. _cn_gcc-attribute-syntax:
64-
65-
gcc-attribute-syntax
66-
https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html
67-
68-
.. _cn_n2049:
30+
Rust
31+
----
6932

70-
n2049
71-
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2049.pdf
33+
内核对 Rust 编程语言 [zh_cn_rust-language]_ 的支持是实验性的,并且可以通过配置选项
34+
``CONFIG_RUST`` 来启用。Rust 代码使用 ``rustc`` [zh_cn_rustc]_ 编译器在
35+
``--edition=2021`` [zh_cn_rust-editions]_ 选项下进行编译。版本(Editions)是一种
36+
在语言中引入非后向兼容的小型变更的方式。
37+
38+
除此之外,内核中还使用了一些不稳定的特性 [zh_cn_rust-unstable-features]_。这些不稳定
39+
的特性将来可能会发生变化,因此,一个重要的目标是达到仅使用稳定特性的程度。
40+
41+
具体请参阅 Documentation/rust/index.rst
42+
43+
.. [zh_cn_c-language] http://www.open-std.org/jtc1/sc22/wg14/www/standards
44+
.. [zh_cn_gcc] https://gcc.gnu.org
45+
.. [zh_cn_clang] https://clang.llvm.org
46+
.. [zh_cn_gcc-c-dialect-options] https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html
47+
.. [zh_cn_gnu-extensions] https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html
48+
.. [zh_cn_gcc-attribute-syntax] https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html
49+
.. [zh_cn_n2049] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2049.pdf
50+
.. [zh_cn_rust-language] https://www.rust-lang.org
51+
.. [zh_cn_rustc] https://doc.rust-lang.org/rustc/
52+
.. [zh_cn_rust-editions] https://doc.rust-lang.org/edition-guide/editions/
53+
.. [zh_cn_rust-unstable-features] https://github.com/Rust-for-Linux/linux/issues/2

0 commit comments

Comments
 (0)