this post was submitted on 25 Mar 2024
537 points (98.6% liked)
Programmer Humor
19463 readers
217 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Compiler is forbidden to assume that
X == 1
would be true. It's also forbidden to assume thatX == Y
.const
just means the address and/or the data at the address is read only.const volatile int* const hwreg;
-> "read only volatile value at read only address hwreg". Compiler can assume thehwreg
address won't magically change, but can't assume the value read from that address won't.