2 ms·
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, th
by jschwartzi 10y ago
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.
- Unklejoe 10y agoAgreed. 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".