Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
anonymousiam
20 days ago
|
parent
|
context
|
favorite
| on:
You can't fool the optimizer
Sometimes you can fool the (C) optimizer by using the 'volatile' keyword in front of a variable in code that would otherwise be optimized out.
https://www.embeddedrelated.com/thread/4749/when-and-how-to-...
mattnewport
20 days ago
|
next
[–]
That's not really "fooling" the optimizer, that's kind of the point of volatile. The optimizer not making optimizations is the intended behaviour.
anonymousiam
19 days ago
|
parent
|
next
[–]
You're right, but the article failed to mention that there was a way around the optimizations.
1718627440
19 days ago
|
prev
[–]
Fooling for you is making someone not do X by telling them not to do X?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
https://www.embeddedrelated.com/thread/4749/when-and-how-to-...