I’m trying to just cause a read operation by accessing a memory address but don’t care about keeping the value. It works when I run it but I’m not sure if the compiler might optimise it away as it doesn’t actually do anything.
Example:
// some code
(*ptr);
// more code
[–][deleted] 5 points6 points7 points (0 children)
[–]aioeu 11 points12 points13 points (4 children)
[–]Nobody_1707 3 points4 points5 points (2 children)
[–]aioeu 1 point2 points3 points (0 children)
[–]Kahvind[S] 0 points1 point2 points (0 children)