People who think they want something volatile should know that assigning to a volatile variable, or through a pointer to volatile, generates a store instruction followed by a load instruction. The load is normally optimized away, but the language definition says it's there (because an assignment has a value), and you said you didn't want optimization. Sometimes the extra load just slows things down, but if the address is really a register, it may be actively wrong.
Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds