*** This issue has been marked as a duplicate of issue 5908 ***
Comment #3 by code — 2014-11-11T13:27:30Z
Doesn't seem to be a duplicate - at least going by the title, the other issue is specifically about the optimizer for compile-time known divisors. This is about runtime behavior.
Comment #4 by bugzilla — 2020-08-09T10:47:12Z
With -O:
int test_int() {
int x;
return x/x;
}
long test_long() {
long x;
return x/x;
}
now gives a compile-time divide-by-zero error.
Comment #5 by dlang-bot — 2020-08-10T01:45:55Z
@WalterBright created dlang/dlang.org pull request #2842 "fix Issue 13569 - Inconsistent integer divide by zero behavior and spec" fixing this issue:
- fix Issue 13569 - Inconsistent integer divide by zero behavior and spec
https://github.com/dlang/dlang.org/pull/2842
Comment #6 by dlang-bot — 2020-08-13T16:51:08Z
dlang/dlang.org pull request #2842 "fix Issue 13569 - Inconsistent integer divide by zero behavior and spec" was merged into master:
- 406860163074ecf603b13c37005c30e7e32898be by Walter Bright:
fix Issue 13569 - Inconsistent integer divide by zero behavior and spec
https://github.com/dlang/dlang.org/pull/2842