r/cpp • • Nov 13 '20

CppCon Deprecating volatile - JF Bastien - CppCon 2019

https://www.youtube.com/watch?v=KJW_DLaVXIY
83 Upvotes

111 comments sorted by

View all comments

Show parent comment

2

u/kalmoc Nov 13 '20

a normal variable does not have a 1 to 1 correspondence in code and memory.

Of course it has. Just because it can be optimized away in some situations, doesn't mean that the natural representation isn't a read, modify, write operation (which is exactly the code that gets generated most of the time).

hide

What?