Bug 19970 – [CTFE] 0 ptr is not null

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-06-15T22:24:44Z
Last change time
2020-09-23T09:42:33Z
Keywords
pull
Assigned to
No Owner
Creator
Eyal

Comments

Comment #0 by eyal — 2019-06-15T22:24:44Z
A bit similar to #6281 : enum void* p = cast(void*)0; static assert(p is null); // fails assert(p is null); // succeeds
Comment #1 by dlang-bot — 2020-09-21T09:58:23Z
@Geod24 created dlang/dmd pull request #11782 "Fix 19970 - Cast from 0 to ptr is not null at CTFE" fixing this issue: - Fix 19970 - Cast from 0 to ptr is not null at CTFE https://github.com/dlang/dmd/pull/11782
Comment #2 by dlang-bot — 2020-09-23T09:42:33Z
dlang/dmd pull request #11782 "Fix 19970 - Cast from 0 to ptr is not null at CTFE" was merged into master: - 9b163a7d9b7ab0cf6b87e69e218476aae75903c9 by Geod24: Fix 19970 - Cast from 0 to ptr is not null at CTFE https://github.com/dlang/dmd/pull/11782