2 ms·
Except, of course, that the compiler can perfectly legally copy the variable behind the scenes and not overwrite the copy. I mean it when I say you cannot.
by TheLoneWolfling 11y ago
Except, of course, that the compiler can perfectly legally copy the variable behind the scenes and not overwrite the copy.
I mean it when I say you cannot.
- Joky 11y agoI'm not sure what you mean here, if you have a volatile pointer that points to a memory buffer returned by malloc, how can the compiler prevents a write through the pointer from happening? Edit: unless your point is a temporary copy can be spilled in memory and this copy will stay in memory and won't be overwritten?
- TheLoneWolfling 11y agoYes, your edit is correct.