Bug 16195 – delete should be @system

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-06-23T11:39:00Z
Last change time
2016-11-24T12:25:47Z
Keywords
pull, safe
Assigned to
nobody
Creator
nick
See also
https://issues.dlang.org/show_bug.cgi?id=16747

Comments

Comment #0 by nick — 2016-06-23T11:39:35Z
Tested with dmd v2.071.0, this compiles: @safe unittest { auto p = new int; delete p; // line 3 } delete is not safe, line 3 should issue an error.
Comment #1 by nick — 2016-06-23T11:41:24Z
(Still no error adding `*p = 3;` after the delete line).
Comment #2 by bugzilla — 2016-06-28T10:56:26Z
Comment #3 by github-bugzilla — 2016-07-01T09:01:59Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e64ae1d3e5aa078a036242864a68499617c9b278 fix Issue 16195 - delete should be @system https://github.com/dlang/dmd/commit/71ecbed629c830fd10c7923cf6298cfce7f54ee7 Merge pull request #5887 from WalterBright/fix16195 fix Issue 16195 - delete should be @system
Comment #4 by github-bugzilla — 2016-10-01T11:48:05Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e64ae1d3e5aa078a036242864a68499617c9b278 fix Issue 16195 - delete should be @system https://github.com/dlang/dmd/commit/71ecbed629c830fd10c7923cf6298cfce7f54ee7 Merge pull request #5887 from WalterBright/fix16195