
例如,一个实现是否允许说“行为是在周末和其他方面”并根据这样的声明实现行为?
解决方法 当然,如果实现文档确切的行为随着不同的运行而变化,那很好.请注意,实现定义的行为是抽象机器参数的一部分: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).
@H_419_14@这不允许在单次运行的编译器中更改行为.但是在编译器的不同运行之间,编译器可以根据实现定义的内容使用不同的相应抽象机器,该机器根据不同的实现定义值而不同.命令行参数(如-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.
@H_419_14@ 总结以上是内存溢出为你收集整理的实现定义的行为是否需要在C中的运行之间保持一致?全部内容,希望文章能够帮你解决实现定义的行为是否需要在C中的运行之间保持一致?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)