[Bug c/22278] gcc -O2 discards cast to volatile
falk at debian dot org
gcc-bugzilla@gcc.gnu.org
Sat Jul 2 17:53:00 GMT 2005
------- Additional Comments From falk at debian dot org 2005-07-02 17:53 -------
(In reply to comment #5)
> Since the orginal pointer is not violatile the cast will not change any thing
since the compiler can
> deduce it is not violatile.
It could deduce that if it was invalid to form a pointer to non-volatile
that points to a volatile object. However, I can't see any point in the standard
that disallows this. So how can gcc deduce the pointed-to object is not volatile?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22278
More information about the Gcc-bugs
mailing list