Hacker News new | ask | show | jobs
by jqpabc123 1811 days ago
What if your function takes a pointer that might be pointing to an "atomic" variable?

Pointers can be used to circumvent most safety measures. If you obscure the access, you should assume responsibility for the result.

1 comments

At least in C++, atomicity is part of the type system, and you would have to explicitly reinterpret cast it away.