@[email protected] to Programmer [email protected] • 1 year agoYou can certainly change it. But should you?lemmy.mlimagemessage-square60fedilinkarrow-up1544
arrow-up1544imageYou can certainly change it. But should you?lemmy.ml@[email protected] to Programmer [email protected] • 1 year agomessage-square60fedilink
minus-square@[email protected]linkfedilinkEnglish13•edit-21 year agoContext is very interesting: https://stackoverflow.com/questions/4592762/difference-between-const-const-volatile Const flags to the code that you cannot change the value, and volatile flags to the compiler that it’s not safe to change the value.
minus-square@[email protected]linkfedilink4•1 year agoVolatile means that the value should be read each time its accessed. It can’t be cached in a register or the read be otherwise assumed and optimized away or the instructions around its access be reordered.
Context is very interesting: https://stackoverflow.com/questions/4592762/difference-between-const-const-volatile
Const flags to the code that you cannot change the value, and volatile flags to the compiler that it’s not safe to change the value.
Volatile means that the value should be read each time its accessed. It can’t be cached in a register or the read be otherwise assumed and optimized away or the instructions around its access be reordered.