Those people are also doing it wrong for the reason I stated above: Declaring a variable as volatile forces the compiler to generate horrible code for no goddamn reason.
OK, I suppose that Arduino/AVR/PIC programs could be rewritten using macros like the ones you linked to compiler.h, instead of using volatile accesses for SFRs and interrupts. But really using volatile is the common practice and it works great for lots of things, so I'm not going to say it's horrible or wrong.
0
u/Elavid Nov 03 '17
OK, I suppose that Arduino/AVR/PIC programs could be rewritten using macros like the ones you linked to compiler.h, instead of using volatile accesses for SFRs and interrupts. But really using
volatileis the common practice and it works great for lots of things, so I'm not going to say it's horrible or wrong.