avoid undefined order of operations in assignments
In several places in our tree we have code which has undefined behaviour because it mutates on both sides of an assignment (which is not a sequence point).
Some are simple dual assignments:
foo = foo = 0
Others are actually convoluted:
(*ldvp) = ++*ldvp;
We should do neither.
Updated by Electric Monk over 7 years ago
- Status changed from New to Closed
- % Done changed from 80 to 100
commit 2bc987325e3ded1865bff043128661815c4690b9 Author: Richard Lowe <firstname.lastname@example.org> Date: 2014-08-29T16:13:11.000Z 5083 avoid undefined order of operations in assignments Reviewed by: Josef 'Jeff' Sipek <email@example.com> Reviewed by: Jason King <firstname.lastname@example.org> Reviewed by: Dan McDonald <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>