[Issue 7765] Cannot access __gshared function pointers from static methods

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 6 09:40:24 PDT 2012


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



--- Comment #2 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-04-06 09:41:02 PDT ---
(In reply to comment #1)
> c_func() is a function, not a function pointer nor a variable, and so __gshared
> has no effect on it.
> 
> Not a bug.

Ok. But why is 'static' required? This won't work:

class Foo
{
    static int test()
    {
        return c_func();
    }

    extern(C) int c_func();
}

test.d(5): Error: need 'this' to access member c_func

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