- 论坛徽章:
- 0
|
本帖最后由 KBTiller 于 2011-04-30 11:00 编辑
3.4.3
undefined behavior
behavior, upon use of a nonportable or erroneous program construct or of erroneous data,for which this International Standard imposes no requirements
NOTE 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).
EXAMPLE An example of undefined behavior is the behavior on integer overflow.
未定义的行为
基于使用不可移植的或错误的程序结构或使用错误的数据的行为,本国际标准对这种行为没有提出任何要求。
注: 可能的未定义行为范围很广,从无视具体情境得到完全不可预测的结果,到在翻译或程序执行过程具体环境下的有案可查的特定方式的行为(给出或不给出诊断信息),甚至包括结束翻译或执行(发出诊断信息)
例:未定义的行为的一个例子就是整数溢出的行为。
=====================================
C90中的定义
Behavior, upon use of a nonportable or erroneous program construct or of erroneous data, or of indeterminately valued objects, for which this International Standard imposes no requirements. |
|