没有合适的资源?快使用搜索试试~ 我知道了~
首页C语言新标准草案N2596:ISO/IEC 9899:202x(E)解读
C语言新标准草案N2596:ISO/IEC 9899:202x(E)解读
需积分: 5 1 下载量 34 浏览量
更新于2024-07-15
收藏 2.79MB PDF 举报
"ISO∕IEC 9899-working draft:n2596 - C18后的C语言最新标准草案" ISO/IEC 9899是国际标准化组织和国际电工委员会联合制定的C语言标准,其工作草案n2596是自C18标准(2018年版)以来的最新版本。这份文档对于C语言的规范、解释及其执行库的内容进行了详细的规定,旨在提升C语言程序在各种计算系统上的可移植性、可靠性和维护性,同时保证高效的执行效率。 C语言标准分为多个条款,详细阐述了语言本身的各种特性,包括但不限于数据类型、控制结构、函数、预处理器等。此外,它还涵盖了C语言执行库的内容,如数学函数、输入输出操作等。附录部分则对这些内容进行了总结,并列举了影响C程序可移植性的因素,这对于开发者理解和优化代码至关重要。 虽然这个标准草案是针对有经验的C语言程序员和C语言翻译系统的实现者,但文档本身并不作为初学者教程设计。因此,它包含了大量的技术细节和规定,需要读者具有一定的编程基础来理解和应用。 为了确保标准的公正性和广泛性,接收此草案的个人或组织被邀请提交与之相关的专利权信息,以及支持性文档。这意味着标准的制定过程考虑到了知识产权的问题,以避免潜在的法律纠纷。 ISO/IEC 9899的每个新版本都反映了C语言的发展和改进,n2596草案可能包含了新的特性、修正了已有的问题,或者对原有规则进行了更明确的定义。对于C语言的开发者和研究者来说,跟踪学习这样的标准草案是非常有价值的,因为它能够帮助他们保持与时俱进,理解最新的编程实践和技术趋势。
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/14910516/bg10.jpg)
N2596 working draft — December 11, 2020 ISO/IEC 9899:202x (E)
INTERNATIONAL STANDARD ©ISO/IEC ISO/IEC 9899:yyyy
Programming languages — C
1. Scope
1
This document specifies the form and establishes the interpretation of programs written in the C
programming language.
1)
It specifies
— the representation of C programs;
— the syntax and constraints of the C language;
— the semantic rules for interpreting C programs;
— the representation of input data to be processed by C programs;
— the representation of output data produced by C programs;
— the restrictions and limits imposed by a conforming implementation of C.
2 This document does not specify
— the mechanism by which C programs are transformed for use by a data-processing system;
— the mechanism by which C programs are invoked for use by a data-processing system;
— the mechanism by which input data are transformed for use by a C program;
— the mechanism by which output data are transformed after being produced by a C program;
—
the size or complexity of a program and its data that will exceed the capacity of any specific
data-processing system or the capacity of a particular processor;
—
all minimal requirements of a data-processing system that is capable of supporting a conform-
ing implementation.
1)
This document is designed to promote the portability of C programs among a variety of data-processing systems. It is
intended for use by implementors and programmers. Annex J gives an overview of portability issues that a C program might
encounter.
§ 1 General 1
![](https://csdnimg.cn/release/download_crawler_static/14910516/bg11.jpg)
ISO/IEC 9899:202x (E) working draft — December 11, 2020 N2596
2. Normative references
1
The following documents are referred to in the text in such a way that some or all of their content
constitutes requirements of this document. For dated references, only the edition cited applies.
For undated references, the latest edition of the referenced document (including any amendments)
applies.
2
ISO/IEC 2382:2015, Information technology — Vocabulary. Available from the ISO online browsing
platform at http://www.iso.org/obp.
3 ISO 4217, Codes for the representation of currencies and funds.
4
ISO 8601, Data elements and interchange formats — Information interchange — Representation of dates and
times.
5
ISO/IEC 10646, Information technology —Universal Coded Character Set (UCS). Available from the
ISO/IEC Information Technology Task Force (ITTF) web site at
http://isotc.iso.org/livelink/
livelink/fetch/2000/2489/Ittf
_
Home/PubliclyAvailableStandards.htm.
6 ISO/IEC60559:2020, Floating-point arithmetic.
7
ISO 80000–2, Quantities and units — Part 2: Mathematical signs and symbols to be used in the natural
sciences and technology.
2 General § 2
![](https://csdnimg.cn/release/download_crawler_static/14910516/bg12.jpg)
N2596 working draft — December 11, 2020 ISO/IEC 9899:202x (E)
3. Terms, definitions, and symbols
1
For the purposes of this document, the terms and definitions given in ISO/IEC 2382, ISO 80000–2,
and the following apply.
2
ISO and IEC maintain terminological databases for use in standardization at the following addresses:
— ISO Online browsing platform: available at https://www.iso.org/obp
— IEC Electropedia: available at http://www.electropedia.org/
3
Additional terms are defined where they appear in italic type or on the left side of a syntax rule.
Terms explicitly defined in this document are not to be presumed to refer implicitly to similar terms
defined elsewhere.
3.1
1 access (verb)
⟨execution-time action⟩ to read or modify the value of an object
2 Note 1 to entry: Where only one of these two actions is meant, “read” or “modify” is used.
3 Note 2 to entry: “Modify” includes the case where the new value being stored is the same as the previous value.
4 Note 3 to entry: Expressions that are not evaluated do not access objects.
3.2
1 alignment
requirement that objects of a particular type be located on storage boundaries with addresses that
are particular multiples of a byte address
3.3
1 argument
actual argument (DEPRECATED: actual parameter)
expression in the comma-separated list bounded by the parentheses in a function call expression, or
a sequence of preprocessing tokens in the comma-separated list bounded by the parentheses in a
function-like macro invocation
3.4
1 behavior
external appearance or action
3.4.1
1 implementation-defined behavior
unspecified behavior where each implementation documents how the choice is made
2 Note 1 to entry: J.3 gives an overview over properties of C programs that lead to implementation-defined behavior.
3 EXAMPLE
An example of implementation-defined behavior is the propagation of the high-order bit when a signed integer
is shifted right.
3.4.2
1 locale-specific behavior
behavior that depends on local conventions of nationality, culture, and language that each implemen-
tation documents
2 Note 1 to entry: J.4 gives an overview over properties of C programs that lead to locale-specific behavior.
§ 3.4.2 General 3
![](https://csdnimg.cn/release/download_crawler_static/14910516/bg13.jpg)
ISO/IEC 9899:202x (E) working draft — December 11, 2020 N2596
3 EXAMPLE
An example of locale-specific behavior is whether the
islower
function returns true for characters other than
the 26 lowercase Latin letters.
3.4.3
1 undefined behavior
behavior, upon use of a nonportable or erroneous program construct or of erroneous data, for which
this document imposes no requirements
2 Note 1 to entry:
Possible undefined behavior ranges from ignoring the situation completely with unpredictable results,
to behaving during translation or program execution in a documented manner characteristic of the environment (with or
without the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic
message).
3 Note 2 to entry: J.2 gives an overview over properties of C programs that lead to undefined behavior.
4 EXAMPLE An example of undefined behavior is the behavior on dereferencing a null pointer.
3.4.4
1 unspecified behavior
behavior, that results from the use of an unspecified value, or other behavior upon which this
document provides two or more possibilities and imposes no further requirements on which is
chosen in any instance
2 Note 1 to entry: J.1 gives an overview over properties of C programs that lead to unspecified behavior.
3 EXAMPLE An example of unspecified behavior is the order in which the arguments to a function are evaluated.
3.5
1 bit
unit of data storage in the execution environment large enough to hold an object that can have one
of two values
2 Note 1 to entry: It need not be possible to express the address of each individual bit of an object.
3.6
1 byte
addressable unit of data storage large enough to hold any member of the basic character set of the
execution environment
2 Note 1 to entry: It is possible to express the address of each individual byte of an object uniquely.
3 Note 2 to entry:
A byte is composed of a contiguous sequence of bits, the number of which is implementation-defined. The
least significant bit is called the low-order bit; the most significant bit is called the high-order bit.
3.7
1 character
⟨abstract⟩ member of a set of elements used for the organization, control, or representation of data
3.7.1
1 character
single-byte character
⟨C⟩ bit representation that fits in a byte
3.7.2
1 multibyte character
sequence of one or more bytes representing a member of the extended character set of either the
source or the execution environment
2 Note 1 to entry: The extended character set is a superset of the basic character set.
4 General § 3.7.2
![](https://csdnimg.cn/release/download_crawler_static/14910516/bg14.jpg)
N2596 working draft — December 11, 2020 ISO/IEC 9899:202x (E)
3.7.3
1 wide character
value representable by an object of type
wchar
_
t
, capable of representing any character in the
current locale
3.8
1 constraint
restriction, either syntactic or semantic, by which the exposition of language elements is to be
interpreted
3.9
1 correctly rounded result
representation in the result format that is nearest in value, subject to the current rounding mode, to
what the result would be given unlimited range and precision
2 Note 1 to entry:
In this document, when the words “correctly rounded” are not immediately followed by “result”, this is the
intended usage.
3.10
1 diagnostic message
message belonging to an implementation-defined subset of the implementation’s message output
3.11
1 forward reference
reference to a later subclause of this document that contains additional information relevant to this
subclause
3.12
1 implementation
particular set of software, running in a particular translation environment under particular con-
trol options, that performs translation of programs for, and supports execution of functions in, a
particular execution environment
3.13
1 implementation limit
restriction imposed upon programs by the implementation
3.14
1 memory location
either an object of scalar type, or a maximal sequence of adjacent bit-fields all having nonzero width
2 Note 1 to entry:
Two threads of execution can update and access separate memory locations without interfering with each
other.
3 Note 2 to entry:
A bit-field and an adjacent non-bit-field member are in separate memory locations. The same applies to
two bit-fields, if one is declared inside a nested structure declaration and the other is not, or if the two are separated by a
zero-length bit-field declaration, or if they are separated by a non-bit-field member declaration. It is not safe to concurrently
update two non-atomic bit-fields in the same structure if all members declared between them are also (nonzero-length)
bit-fields, no matter what the sizes of those intervening bit-fields happen to be.
4 EXAMPLE A structure declared as
struct {
char a;
int b:5, c:11,:0, d:8;
struct { int ee:8; } e;
}
§ 3.14 General 5
剩余646页未读,继续阅读
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://profile-avatar.csdnimg.cn/9170b427686743249fc50c9db5969c9f_luuan.jpg!1)
LuuHunan
- 粉丝: 3
- 资源: 15
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
最新资源
- 解决Eclipse配置与导入Java工程常见问题
- 真空发生器:工作原理与抽吸性能分析
- 爱立信RBS6201开站流程详解
- 电脑开机声音解析:故障诊断指南
- JAVA实现贪吃蛇游戏
- 模糊神经网络实现与自学习能力探索
- PID型模糊神经网络控制器设计与学习算法
- 模糊神经网络在自适应PID控制器中的应用
- C++实现的学生成绩管理系统设计
- 802.1D STP 实现与优化:二层交换机中的生成树协议
- 解决Windows无法完成SD卡格式化的九种方法
- 软件测试方法:Beta与Alpha测试详解
- 软件测试周期详解:从需求分析到维护测试
- CMMI模型详解:软件企业能力提升的关键
- 移动Web开发框架选择:jQueryMobile、jQTouch、SenchaTouch对比
- Java程序设计试题与复习指南
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)