Bug 5415 – @Safe functions not working

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2011-01-05T09:08:00Z
Last change time
2011-06-26T16:26:53Z
Keywords
accepts-invalid, patch
Assigned to
nobody
Creator
eatingstaples

Attachments

IDFilenameSummaryContent-TypeSize
860main.dCode showing features not workingapplication/octet-stream444

Comments

Comment #0 by eatingstaples — 2011-01-05T09:08:13Z
Created attachment 860 Code showing features not working This is either a compiler bug, or outdated language documentation, but I'm having some freedom with @safe functions: * No casting from a pointer type to any type other than void*. * No modification of pointer values. * No taking the address of a local variable or function parameter. I've attached code which does all three of these things, which compiles and runs. Inline assembler was an error, as well as casting from integer to a pointer type, but I didn't test anything else. I'm using dmd2.exe as my compiler.
Comment #1 by yebblies — 2011-06-11T07:36:56Z
Comment #2 by bugzilla — 2011-06-26T16:26:53Z