This is the mail archive of the gcc@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]

Re: Why doesn't combine like volatiles? (volatile_ok again, sorry!)


Richard Earnshaw wrote:

Possibly, but I think the more interesting observation is listed in
parenthesis: Can a volatile access ever alias a non-volatile access?

I think the answer is no, Certainly Ada has compile time rules carefully written to make this impossible.

Logic would suggest that a program is unpredictable if written in such a
way that permits such aliases to exist, since it would mean a location
is being accessed in both non-volatile and volatile manner.

Exactly!



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