久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

專注電子技術學習與研究
當前位置:單片機教程網 >> MCU設計實例 >> 瀏覽文章

Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement.

作者:未知   來源:Levi之家的空間   點擊數:  更新時間:2014年08月16日   【字體:

IAR編譯的時候,出現警告如下:

Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement.

Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement
EW targets: All
EW component: C/C++ compiler
Keywords: C code, keywords, SFR, UART
Last update: January 14, 2009

Background
The warning [Pa082] is issued if 2 (or more) of the variables in a C-statment are volatile. The message text "...order of volatile accesses is undefined..." is the central information, i.e. the compiler (following the ANSII standard) can access the variables in an order that is not defined.

Is this a problem , or not...
...well that depends on your application.
Volatile is (typically) used for variables that are accessed from several threads in the application, and for Special Function Register that are the connection in/out of the chip. So you must study the volatile variables that are present in this C-statement and from the usage of these volatile variables decide if you must make a change or not.

How to change
The change is to break up the C-statement, so that each new C-statement holds only one access to a volatile variable.
In this small example the variables internalChannelSelect and ADC are volatile. If so the following C-source will issue the "Warning[Pa082]".

intAnalogSample[internalChannelSelect] = ADC[internalChannelSelect] ;

Then the following change will make the C-source predictable.

i = internalChannelSelect;
k = ADC;
intAnalogSample
= k;

 

原因是一條語句中出現2個或2個以上的volatile變量。可以利用中間變量將其修改。也可以在,



也可

關閉窗口

相關文章

主站蜘蛛池模板: 一区二区免费 | 欧美精品一区二区三区在线 | 国产精品1区2区3区 欧美 中文字幕 | 中文字幕一区二区三区精彩视频 | 日韩一区中文字幕 | 天天插天天射天天干 | 九九热这里 | 国产视频一区二区 | 波多野结衣在线观看一区二区三区 | 亚洲国产精品精华素 | 国产三级一区二区 | 国产精品中文在线 | 欧美一级毛片在线播放 | 久久国产精品-国产精品 | 国产福利免费视频 | 欧美黄色大片在线观看 | 精品一级电影 | 欧美激情精品久久久久久 | 国产 91 视频| 亚洲一区二区三区在线观看免费 | 久久久久久国产精品 | 91精品国产91久久久久福利 | 亚洲精品久久久久久宅男 | 神马久久av | 成人精品免费视频 | 欧美一区二区免费 | 亚洲成人久久久 | 欧美另类视频在线 | 久久久精品日本 | 欧美日韩亚洲一区二区 | 亚洲精品一区二区三区 | 日韩精品在线一区二区 | 欧美日韩一区二区三区在线观看 | 欧美日韩不卡 | 精品一区精品二区 | 一区二区福利视频 | 亚洲精品在线视频 | 在线一区二区国产 | 亚洲一区二区三区免费在线观看 | 亚洲天堂中文字幕 | 国产精品视频观看 |