Bug 10359 – Pointer slicing allowed in @safe mode

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-14T14:39:00Z
Last change time
2013-10-03T20:58:40Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
bugzilla

Comments

Comment #0 by bugzilla — 2013-06-14T14:39:40Z
The following code should be invalid in @safe mode, but is currently accepted by the compiler: void foo(int* p) @safe { auto a = p[0 .. 10]; }
Comment #1 by henning — 2013-06-19T07:46:23Z
Comment #2 by github-bugzilla — 2013-06-19T09:58:59Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f3b502ba585d332f4ea7dd98c918f7b8b79d9c59 fix issue 10359 - Pointer slicing allowed in @safe mode https://github.com/D-Programming-Language/dmd/commit/a80a4cc99e949a84398a91cba3e751a4c571c04c Merge pull request #2226 from hpohl/10359 fix issue 10359 - Pointer slicing allowed in @safe mode
Comment #3 by github-bugzilla — 2013-06-20T19:24:56Z
Comment #4 by github-bugzilla — 2013-06-27T18:53:33Z
Comment #5 by k.hara.pg — 2013-10-03T20:58:40Z
*** Issue 11167 has been marked as a duplicate of this issue. ***