News for hackers. Stuff that matters.
Re:What Every C Programmer Should Know About Undefined Behav... by jschwartzi on Thursday January 05, 2017 @09:40AM (#13327390)
If your dereference compiles into a read from a register, then in the case that the register is clear-on-read like some interrupt status registers I've seen, the dereference will have unintended side effects.
Re:What Every C Programmer Should Know About Undefined Behav... by Unklejoe on Thursday January 05, 2017 @10:33AM (#13327887)
Agreed. However, I believe that in C, standard variable types are assumed to not have such side effects on a read, which is why such variables must be explicitly declared as "volatile".