Summary: Intrinsic functions do not have pointers
           Product: D
           Version: D1
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from Burton Radons <> 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.
     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:
------- You are receiving this mail because: -------

Reply via email to