D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19970 - [CTFE] 0 ptr is not null
Summary: [CTFE] 0 ptr is not null
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 major
Assignee: No Owner
URL: http://dlang.org/
Keywords: pull
Depends on:
Blocks:
 
Reported: 2019-06-15 22:24 UTC by Eyal
Modified: 2020-09-23 09:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Eyal 2019-06-15 22:24:44 UTC
A bit similar to #6281 :

enum void* p = cast(void*)0;
static assert(p is null);   // fails
assert(p is null);          // succeeds
Comment 1 Dlang Bot 2020-09-21 09:58:23 UTC
@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 Dlang Bot 2020-09-23 09:42:33 UTC
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