News for hackers. Stuff that matters.
Re:Zcoin implementation bug enabled attacker to create over ... by maccard on Tuesday March 07, 2017 @05:12AM (#13809396)
I'm not advocating writing any code like this, but you can have an overloaded == operator that _does_ have side effects, e.g. [0]

[0] https://ideone.com/eJgiN9

Re:Zcoin implementation bug enabled attacker to create over ... by Sanddancer on Tuesday March 07, 2017 @07:11AM (#13809769)
It gets more fun when you're dealing with things like memory mapped I/O, where reading from a register is a destructive action, so even a non-overloaded == can cause side effects.
Re:Zcoin implementation bug enabled attacker to create over ... by WalterBright on Tuesday March 07, 2017 @03:00PM (#13814156)
That's what volatile reads are for - they indicate a side effect.