This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/17336] AVRGCC ignores "volatile" keyword for "register" variables


------- Additional Comments From m_klokov at mail dot ru  2004-09-24 18:07 -------
(In reply to comment #4)
> Not a bug, volatile on global registers means nothing.

Why do you think so?

Volatile means volatile, it shouldn't depend of "register"
or not, global or local.

Anyway compiler should assume that this variable can be altered
by external process (thread, interrupt handler or hardware).
So it souldn't copy this value to another temporary place and
use this copy when I want to read this value, as the real value 
CAN BE CHANGED. Please refere to samples I provided before.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17336


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]