- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
c表达式求值顺序优先级详解(Cexpressionevaluationorderprioritypriority)
c++表达式求值顺序优先级详解(C++ expression evaluation order priority priority)
The order of expression evaluation is different from operation associativity and priority. The following is a classic example of the ISO C99/ C 98 /03 three standard explicitly mentioned: his results are uncertain (unspecified).
I I = 1; / / The behavior is unspecified
Before introducing the concept, lets explain its results first. This expression (expression) contains 3 sub expressions (subexpression):
E1 = I
E2 = E1 1
I = E2
These three sub expressions do not have the order of points (sequence, point), while I and I = E3 are expressions with side effects (side, effect). Since there are no sequential points, the language does not guarantee the order of the two side effects.
Even more frightening is that if I is an builtin type and is rewritten more than once before the next order point, then the result is undefined (undefined)! For example, in this case, if there is:
Int i = 0x1000fffe;
I I = 1; / / The result is undefined!!
You might think that his result is 1 plus two, which is actually worse - it could be 0x1001ffff. His high byte accepts the content of a side effect, while the lower byte accepts another side-effect! If I is a pointer, it will easily cause a program crash.
Why do you do that? For the compiler provider, the uncertain order plays an important role in optimization. A common optimization strategy, for example, is to reduce register occupancy and temporary objects. The compiler can reorganize the evaluation of expressions so as not to use additional registers as well as temporary variables. More strictly speaking, even if the compiler cannot complete serialization provider instructions (such as not strict rules to read and write the order), because CPU itself has the right to modify the sequence of instructions, in order to reach the high speed.
The following terms are subject to ISO, C99 and C 03. Translated as reference and accompanied by the original terms, if there is any explanat
您可能关注的文档
- 2009年感动中国10大人物(2009 moved China's top 10 people).doc
- 2009年下半年物流管理专业(本科)毕业论文写作指导要求(The second half of 2009, logistics management major (undergraduate) thesis writing guidance requirements).doc
- 2009年招生考试大纲 - 辽宁省残联1006(2009 admission examination outline - Liaoning CDPF 1006).doc
- 2009年山东省小学体育优质课评选观感(Impressions on the selection of high quality physical education in primary schools of Shandong Province in 2009).doc
- 2009年涉及个人所得税的主要税收政策(The main tax policy involving personal income tax in 2009).doc
- 2009感动中国人物(2009 move Chinese characters).doc
- 2009年江苏省建设工程造价员资格考试土建造价案例分析试卷(In 2009, Jiangsu construction project cost qualification examination civil construction cost case analysis papers).doc
- 2009感动中国评选颁奖词(2009 moved China to award awards).doc
- 200张纸牌的魅力(The charm of 200 cards).doc
- 2010-2011学年第二学期德育工作总结(A summary of moral education in the second semester of the 2010-2011 academic year).doc
- c++语言程序设计(第四版 清华大学出版社)部分课后习题解答(C++ programming language (Fourth Edition, Tsinghua University Press) part of after-school Exercises answer).doc
- c-medium对抗卡罗拉 菲亚特期待在华复兴(C-medium against corolla Fiat looking at Hua Fuxing).doc
- c1驾照考试_科目二考试内容及合格标准-桩考及路考(C1 _ driving test subjects two exam content and standard of pile test and road test).doc
- cad图导入到cdr中的方法(The method of importing CAD diagrams into CDR).doc
- cad图导入photoshop(CAD图导入PS图象处理软件).doc
- cad导入su(CAD import Su).doc
- c++统计足球联赛(有错)(C++ statistics Football League (wrong)).doc
- cad文件导入coreldraw的方法与技巧(The method and skill of importing CorelDRAW into CAD file).doc
- cad随层bylayer随块byblock详解(CAD随层-随块详解从未改变).doc
- cam350菜单中文详解(CAM350 menu Chinese detailed explanation).doc
文档评论(0)