This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/22278] gcc -O2 discards cast to volatile
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jul 2005 16:35:50 -0000
- Subject: [Bug c/22278] gcc -O2 discards cast to volatile
- References: <20050702164323.22278.olivier.baudron@m4x.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2005-07-16 16:35 -------
Subject: Re: gcc -O2 discards cast to volatile
"hugh at mimosa dot com" <gcc-bugzilla@gcc.gnu.org> writes:
[...]
| If GCC (a) wants to be C99-conforming, and (b) wants to provide useful
| semantics for `volatile', this is a bug.
Based on discussions via private mails, I've become even more
convinced that we should just honor the volatile access as written by
the programmer. Furthermore, this should be clearly documented.
Patches are welcome!
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22278