[Issue 5415] New: @Safe functions not working

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 5 09:10:28 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5415

           Summary: @Safe functions not working
           Product: D
           Version: D2
          Platform: All
               URL: http://www.digitalmars.com/d/2.0/function.html#functio
                    n-safety
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: eatingstaples at gmail.com


--- Comment #0 from eatingstaples at gmail.com 2011-01-05 09:08:13 PST ---
Created an attachment (id=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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list