This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17336] AVRGCC ignores "volatile" keyword for "register" variables
- From: "m_klokov at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Sep 2004 18:07:52 -0000
- Subject: [Bug c/17336] AVRGCC ignores "volatile" keyword for "register" variables
- References: <20040906135657.17336.m_klokov@mail.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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