On Tuesday, 5 November 2019 at 06:44:29 UTC, Manu wrote:
On Mon., 4 Nov. 2019, 2:05 am John Chapman via Digitalmars-d-announce, < [email protected]> wrote:

Something has changed with core.atomic.cas - it used to work with `null` as the `ifThis` argument, now it throws an AV. Is this intentional?

If I use `cast(shared)null` it doesn't throw but if the change was deliberate shouldn't it be mentioned?


Changes were made because there were a lot of problems with that module... but the (reasonably comprehensive) unit tests didn't reveal any such regressions. We also build+test many popular OSS projects via buildkite,
and there weren't problems.
Can you show the broken code?

Sure - this AVs on DMD 2.088 Windows:

import core.atomic;
void main() {
  Object a, b = new Object;
  cas(cast(shared)&a, null, cast(shared)b);
}

Reply via email to