[Issue 4541] New: Intrinsic functions do not have pointers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 31 09:38:21 PDT 2010


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

           Summary: Intrinsic functions do not have pointers
           Product: D
           Version: D1
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: burton-radons at shaw.ca


--- Comment #0 from Burton Radons <burton-radons at shaw.ca> 2010-07-31 09:38:19 PDT ---
This code fails to link:

    import std.math;
    void main() {
        real function(real) c = &sin;
    }

With the error message:

    D:\Source>dmd-1 test.d test.exe
    OPTLINK (R) for Win32  Release 8.00.2
    Copyright (C) Digital Mars 1989-2009  All rights reserved.
    http://www.digitalmars.com/ctg/optlink.html
    test.obj(test)
     Error 42: Symbol Undefined _D3std4math3sinFeZe
    --- errorlevel 1

Because std.math.sin is intrinsic. This should either be detected at compile
time or (better yet) a function should be added to Phobos that gives this
function a body.

This affects treating large sets of functions homogenously, such as exporting
to a scripting language.

-- 
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