例如,一个实现是否允许说“行为是在周末和其他方面”并根据这样的声明实现行为?
解决方法
The semantic descriptions in this International Standard define a parameterized nondeterministic abstract
machine.Certain aspects and operations of the abstract machine are described in this International Standard as implementation-defined (for example,sizeof(int)). These constitute the parameters of the abstract machine. Each implementation shall include documentation describing its characteristics and behavior in these respects. Such documentation shall define the instance of the abstract machine that corresponds to that implementation (referred to as the ‘‘corresponding instance’’ below).
这不允许在单次运行的编译器中更改行为.但是在编译器的不同运行之间,编译器可以根据实现定义的内容使用不同的相应抽象机器,该机器根据不同的实现定义值而不同.命令行参数(如-Wall(更改实现定义的诊断消息集))是最常见的示例.除文档要求外,这与未指定的行为有所不同.未指定的行为限制性要小得多:
Certain other aspects and operations of the abstract machine are described in this International Standard as unspecified (for example,order of evaluation of arguments to a function). Where possible,this International Standard defines a set of allowable behaviors. These define the nondeterministic aspects of the abstract machine. An instance of the abstract machine can thus have more than one possible execution sequence for a given program and a given input.